diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3556678..12d5017 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -36,7 +36,7 @@ repos: # Similar to: https://stackoverflow.com/a/73603491/5755604 additional_dependencies: ['types-PyYAML'] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.2.0 + rev: v0.2.1 hooks: - id: ruff args: diff --git a/pyproject.toml b/pyproject.toml index be90b3f..bffe587 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -74,6 +74,13 @@ exclude_also = [ show_missing = true [tool.ruff] + + +include = ["*.py", "*.pyi", "**/pyproject.toml", "*.ipynb"] + + +[tool.ruff.lint] + # See rules: https://beta.ruff.rs/docs/rules/ select = [ "C", # flake8-comprehensions @@ -96,8 +103,6 @@ select = [ "W", # pycodestyle warnings ] -include = ["*.py", "*.pyi", "**/pyproject.toml", "*.ipynb"] - ignore = [ "E501", # line too long, handled by black "N803", # argument name should be lowercase @@ -107,18 +112,17 @@ ignore = [ "W191", # tab identation ] -[tool.ruff.lint] preview = true [tool.ruff.format] preview = true -[tool.ruff.isort] +[tool.ruff.lint.isort] known-first-party = ["tclf"] section-order = ["future", "standard-library", "third-party", "first-party", "local-folder"] -[tool.ruff.per-file-ignores] +[tool.ruff.lint.per-file-ignores] "__init__.py" = ["D104", "F401"] # disable missing docstrings in __init__, unused imports -[tool.ruff.pydocstyle] +[tool.ruff.lint.pydocstyle] convention = "google"