diff --git a/.github/workflows/qc.yml b/.github/workflows/qc.yml index 6eb596f..0e66790 100644 --- a/.github/workflows/qc.yml +++ b/.github/workflows/qc.yml @@ -29,7 +29,7 @@ jobs: - name: Check common spelling errors run: poetry run tox -e codespell - - name: Check code quality with flake8 + - name: Check code quality with ruff run: poetry run tox -e lint - name: Test with pytest and generate coverage file diff --git a/pyproject.toml b/pyproject.toml index 8179e41..318483b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -109,6 +109,7 @@ extend-ignore = [ "D212", # `multi-line-summary-first-line` ] +# Allow autofix for all enabled rules (when `--fix`) is provided. fixable = ["ALL"] # Select or ignore from https://beta.ruff.rs/docs/rules/ @@ -125,7 +126,8 @@ select = [ unfixable = [] # Unlike Flake8, default to a complexity level of 10. -mccabe = { max-complexity = 10 } +[tool.ruff.lint.mccabe] +max-complexity = 10 [tool.ruff.lint.isort] known-third-party = ["duckdb"] @@ -136,13 +138,6 @@ count = "" quiet-level = 3 # ignore-words-list = "" -[tool.isort] -profile = "black" -multi_line_output = 3 -line_length = 100 -include_trailing_comma = true -reverse_relative = true - [build-system] requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"] build-backend = "poetry_dynamic_versioning.backend" diff --git a/tox.ini b/tox.ini index dbdef3f..1575640 100644 --- a/tox.ini +++ b/tox.ini @@ -34,22 +34,18 @@ commands = coverage erase # This is used during development [testenv:lint-fix] deps = - black ruff skip_install = true commands = - black src/ tests/ --exclude "/(tests/input|tests/output)/" ruff --fix src/ tests/ --exclude tests/input --exclude tests/output description = Run linters. # This is used for QC checks. [testenv:lint] deps = - black ruff skip_install = true commands = - black --check --diff src/ tests/ --exclude "/(tests/input|tests/output)/" ruff check src/ tests/ --exclude tests/input --exclude tests/output description = Run linters.