diff --git a/.github/workflows/ruff.yml b/.github/workflows/ruff.yml index 3bbb3b1..0868231 100644 --- a/.github/workflows/ruff.yml +++ b/.github/workflows/ruff.yml @@ -13,4 +13,4 @@ jobs: steps: - uses: actions/checkout@v3 - run: pip install --user ruff - - run: ruff check -- --format=github . + - run: ruff check . diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f3f83d7..c9a2f89 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,11 +9,10 @@ repos: - --remove-all-unused-imports exclude: test/integration/(actual|expected|samples).* - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.259 + rev: v0.6.1 hooks: - id: ruff - # args: [--fix, --exit-non-zero-on-fix] - - repo: https://github.com/psf/black + - repo: https://github.com/psf/blackĖ†c rev: 22.10.0 hooks: - id: black diff --git a/pyproject.toml b/pyproject.toml index 9bbd0af..ba0546c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,6 +62,11 @@ module = "astor" ignore_missing_imports = true [tool.ruff] +line-length = 141 +target-version = "py37" +exclude = ["build/**"] + +[tool.ruff.lint] extend-select = [ "C9", "I", @@ -71,18 +76,16 @@ extend-select = [ extend-ignore = [ "S101", ] -line-length = 141 -target-version = "py37" -[tool.ruff.mccabe] +[tool.ruff.lint.mccabe] max-complexity = 22 -[tool.ruff.pylint] +[tool.ruff.lint.pylint] max-args = 7 max-branches = 18 max-statements = 67 -[tool.ruff.per-file-ignores] +[tool.ruff.lint.per-file-ignores] "test/*" = ["I", "S"] "test/integration/*" = [ "F523", @@ -93,3 +96,5 @@ max-statements = 67 "test/test_lexer.py" = ["F841"] "test/test_pyproject.py" = ["E712"] "test/test_styles.py" = ["S311"] +"**/tests/*" = ["S101", "ANN"] +"**/__init__.py" = ["F401"]