lint: Replace isort with Ruff.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2023-10-27 19:03:38 -07:00
parent 01a27a3a1b
commit 2a0eff653d
4 changed files with 14 additions and 9 deletions

View file

@ -2,7 +2,6 @@
from typing import Any, Dict from typing import Any, Dict
import packaged_helloworld import packaged_helloworld
from zulip_bots.lib import BotHandler from zulip_bots.lib import BotHandler
__version__ = packaged_helloworld.__version__ __version__ = packaged_helloworld.__version__

View file

@ -93,7 +93,21 @@ pythonpath = [
] ]
[tool.ruff] [tool.ruff]
select = [
"E", # style errors
"F", # flakes
"I", # import sorting
]
ignore = [ ignore = [
"E402", # Module level import not at top of file "E402", # Module level import not at top of file
"E501", # Line too long
"E731", # Do not assign a `lambda` expression, use a `def` "E731", # Do not assign a `lambda` expression, use a `def`
] ]
src = [
"tools",
"zulip",
"zulip/integrations/zephyr",
"zulip_bots",
"zulip_botserver",
]
line-length = 100

View file

@ -1,7 +1,6 @@
crayons crayons
twine twine
black~=23.10.1 black~=23.10.1
isort
mock mock
pytest pytest
pytest-cov pytest-cov

View file

@ -38,13 +38,6 @@ def run() -> None:
linter_config.external_linter( linter_config.external_linter(
"gitlint", ["tools/lint-commits"], description="Git Lint for commit messages" "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( linter_config.external_linter(
"black", "black",
["black"], ["black"],