Skip to content

Commit

Permalink
lint: Replace isort with Ruff.
Browse files Browse the repository at this point in the history
Signed-off-by: Anders Kaseorg <[email protected]>
  • Loading branch information
andersk committed Oct 28, 2023
1 parent 01a27a3 commit 2a0eff6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from typing import Any, Dict

import packaged_helloworld

from zulip_bots.lib import BotHandler

__version__ = packaged_helloworld.__version__
Expand Down
14 changes: 14 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,21 @@ pythonpath = [
]

[tool.ruff]
select = [
"E", # style errors
"F", # flakes
"I", # import sorting
]
ignore = [
"E402", # Module level import not at top of file
"E501", # Line too long
"E731", # Do not assign a `lambda` expression, use a `def`
]
src = [
"tools",
"zulip",
"zulip/integrations/zephyr",
"zulip_bots",
"zulip_botserver",
]
line-length = 100
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
crayons
twine
black~=23.10.1
isort
mock
pytest
pytest-cov
Expand Down
7 changes: 0 additions & 7 deletions tools/lint
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,6 @@ def run() -> None:
linter_config.external_linter(
"gitlint", ["tools/lint-commits"], description="Git Lint for commit messages"
)
linter_config.external_linter(
"isort",
["isort"],
["py"],
description="Sorts Python import statements",
check_arg=["--check-only", "--diff"],
)
linter_config.external_linter(
"black",
["black"],
Expand Down

0 comments on commit 2a0eff6

Please sign in to comment.