Skip to content

Commit

Permalink
Merge pull request #78 from iQuxLE/ruff_linting_only
Browse files Browse the repository at this point in the history
Optimize linting setup - utilize solely Ruff
  • Loading branch information
caufieldjh authored Aug 30, 2024
2 parents 7874fe3 + f6a036a commit 5d0aeb9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/qc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 3 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand All @@ -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"]
Expand All @@ -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"
Expand Down
4 changes: 0 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit 5d0aeb9

Please sign in to comment.