diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 3415759..1c3092b 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -46,9 +46,6 @@ jobs: - name: Run Black run: poetry run task black --check - - name: Run isort - run: poetry run task isort --check - - name: Run safety run: poetry export -f requirements.txt | poetry run safety check --bare --stdin diff --git a/poetry.lock b/poetry.lock index 1e02a14..6ee00f3 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1227,4 +1227,4 @@ zstd = ["zstandard (>=0.18.0)"] [metadata] lock-version = "2.0" python-versions = "^3.8.1" -content-hash = "7fca2dd6e01d17a96e3c380b685248f7b5f80a0fa6ae655235af14d77e7e9ac4" +content-hash = "20ee4dbf92246f9decd351002e8be22f3e73ab0688be394ba56cdcb0d5d7e8f4" diff --git a/pyproject.toml b/pyproject.toml index f16967f..1281cb6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,7 +18,6 @@ bl = "binarylane.console.__main__:main" [tool.poetry.group.dev.dependencies] taskipy = "^1.10.3" -isort = "*" black = "*" mypy = "*" types-python-dateutil = "^2.8.19" @@ -31,24 +30,13 @@ ruff = "^0.9.6" [tool.taskipy.tasks] generate = "python scripts/generate.py" black = "black ." -isort = "isort ." +isort = "ruff check --select I . --fix" mypy = "mypy ." ruff = "ruff check src" safety = "poetry export -f requirements.txt | safety check --bare --stdin" test = "pytest tests" check = "task isort && task black && task mypy && task ruff && task test && task safety" -[tool.isort] -py_version = 37 -line_length = 120 -profile = "black" -sections=['FUTURE', 'STDLIB', 'COMPAT', 'THIRDPARTY', 'FIRSTPARTY', 'LOCALFOLDER'] -no_lines_before=["COMPAT"] -known_compat=["binarylane.pycompat"] -known_first_party=["binarylane"] -known_local_folder=["binarylane.console"] -add_imports=["from __future__ import annotations"] - [tool.black] line-length = 120 target_version = ["py37"] @@ -62,9 +50,17 @@ exclude = [ ] [tool.ruff.lint] -select = ["E4", "E7", "E9", "F", "TC", "PL"] +select = ["E4", "E7", "E9", "F", "TC", "PL", "I"] ignore = ["PLR"] +[tool.ruff.lint.isort] +section-order = ["future", "standard-library", "compat", "third-party", "first-party", "local-folder"] +no-lines-before = ["compat"] +sections = { "compat" = ["binarylane.pycompat"] } +known-first-party = ["binarylane"] +known-local-folder = ["binarylane.console"] +required-imports = ["from __future__ import annotations"] + [tool.mypy] disallow_any_generics = true disallow_untyped_defs = true