diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cb8f808ff..0cd5b41e6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -41,7 +41,7 @@ repos: - id: check-github-actions - id: check-github-workflows - repo: https://github.com/commitizen-tools/commitizen - rev: v3.14.0 + rev: v3.14.1 hooks: - id: commitizen stages: [commit-msg] @@ -125,7 +125,7 @@ repos: always_run: true args: [., --min=10] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.15 + rev: v0.2.1 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] diff --git a/pyproject.toml b/pyproject.toml index 481c41923..7c281fef8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -105,7 +105,7 @@ poetry = ">=1.5.1" pre-commit = ">=2.20.0" pre-commit-update = ">=0.1.3" pylint = {extras = ["spelling"], version = "3.0.3"} # Update this by running scripts/update_development_dependencies.py -pyright = "1.1.349" # Update this by running scripts/update_development_dependencies.py +pyright = "1.1.350" # Update this by running scripts/update_development_dependencies.py pyroma = ">=4.2" pytest = ">=7.1.2" pytest-cov = ">=3.0.0" @@ -113,7 +113,7 @@ pytest-html = ">=4.0" pytest-order = ">=1.0.1" pytest-profiling = ">=1.7.0" python-semantic-release = ">=8.5.1" -ruff = "0.1.15" # Update this by running scripts/update_development_dependencies.py +ruff = "0.2.1" # Update this by running scripts/update_development_dependencies.py safety = ">=2.1.1" sphinx-autoapi = ">=2.0.0" sphinx-copybutton = ">=0.5.1" @@ -267,6 +267,12 @@ ignore_directives = [ ] [tool.ruff] +line-length = 100 +namespace-packages = ["examples/**", "scripts/**", "tests/**"] +src = ["docs", "examples", "scripts", "src", "tests"] +target-version = "py38" # always generate Python 3.8 compatible code + +[tool.ruff.lint] allowed-confusables = ["¸", "×"] fixable = [ "F401", @@ -274,6 +280,8 @@ fixable = [ "I", "RUF100" ] +flake8-pytest-style = {mark-parentheses = false} +flake8-quotes = {docstring-quotes = "double"} ignore = [ "ANN101", # Missing type annotation for self in method "ANN102", # Missing type annotation for cls in method @@ -297,23 +305,15 @@ ignore = [ "UP024", # Replace aliased errors with `OSError` "UP037" # Remove quotes from type annotation ] -line-length = 100 -namespace-packages = ["examples/**", "scripts/**", "tests/**"] +pydocstyle = {convention = "google"} +pylint = {max-args = 7} # https://beta.ruff.rs/docs/rules/ select = [ "ALL" ] -src = ["docs", "examples", "scripts", "src", "tests"] -target-version = "py38" # always generate Python 3.8 compatible code task-tags = ["FIXME", "FUTURE", "RELIC", "TODO"] -[tool.ruff.flake8-pytest-style] -mark-parentheses = false - -[tool.ruff.flake8-quotes] -docstring-quotes = "double" - -[tool.ruff.isort] +[tool.ruff.lint.isort] force-sort-within-sections = false known-first-party = [ "conftest", @@ -323,7 +323,7 @@ known-first-party = [ lines-between-types = 1 order-by-type = false -[tool.ruff.per-file-ignores] +[tool.ruff.lint.per-file-ignores] "examples/**" = [ "S101" # Use of assert detected ] @@ -355,12 +355,6 @@ order-by-type = false "PYI053" # String and bytes literals longer than 50 characters are not permitted ] -[tool.ruff.pydocstyle] -convention = "google" - -[tool.ruff.pylint] -max-args = 7 - [tool.semantic_release] version_toml = [ "pyproject.toml:tool.poetry.version"