Skip to content

Commit

Permalink
black → ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
raylu committed Dec 26, 2023
1 parent 5f2f73a commit c8c5509
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 102 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@ jobs:
cache: poetry
- name: install python packages
run: poetry install --with dev --no-interaction
- name: black
run: poetry run black --check futaba
- run: poetry run ruff format --check futaba
4 changes: 3 additions & 1 deletion futaba/sql/models/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,9 @@ def fetch_filter_immune_users(self, guild):
self.tb_filter_immune_users.c.guild_id == guild.id
)
result = self.sql.execute(sel)
self.immune_users_cache[guild].update(user_id for user_id, in result.fetchall())
self.immune_users_cache[guild].update(
user_id for (user_id,) in result.fetchall()
)
return self.immune_users_cache[guild]

def get_filter_immune_users(self, guild):
Expand Down
2 changes: 1 addition & 1 deletion futaba/sql/models/guilds.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def get_guild_ids(self):
sel = select([self.tb_guilds.c.guild_id])
result = self.sql.execute(sel)

return (guild_id for guild_id, in result.fetchall())
return (guild_id for (guild_id,) in result.fetchall())

@staticmethod
def _get_guild(bot, guild_id):
Expand Down
124 changes: 27 additions & 97 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ tree-format = ">=0.1.2"
python-jose = ">=3.2.0"

[tool.poetry.group.dev.dependencies]
black = "^23.1.0"
ruff = "^0.1.9"
pylint = ">=2.5"

[build-system]
Expand Down

0 comments on commit c8c5509

Please sign in to comment.