Skip to content

Commit

Permalink
chore(ruff): upgrade to ruff v0.2.0 (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
qartik authored Feb 2, 2024
1 parent 6187073 commit fdbb56b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ repos:
- black==23.10.1

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.15
rev: v0.2.0
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pre-commit==3.6.0
pydata_sphinx_theme==0.15.2
pytest==8.0.0
pytket==1.24.0
ruff==0.1.15
ruff==0.2.0
setuptools_scm==8.0.4
sphinx==7.2.6
wasmtime==17.0.0
Expand Down
19 changes: 11 additions & 8 deletions ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ target-version = "py310"
line-length = 88
preview = true

select = [
lint.select = [
"E", # pycodestyle Errors
"W", # pycodestyle Warnings

"A", # flake8-builtins
# "ANN", # flake8-annotations
"ANN", # flake8-annotations
"ARG", # flake8-unused-arguments
"B", # flake8-Bugbear
"BLE", # flake8-blind-except
Expand Down Expand Up @@ -61,15 +61,15 @@ select = [
"YTT", # flake8-2020
]

ignore = [
lint.ignore = [
"FIX002", # Allow todos (4)
"D100", # Missing docstring in public module (18)
"D107", # Missing docstring in `__init__` (5)

"COM812", "ISC001" # required for `ruff format`
]

[per-file-ignores]
[lint.per-file-ignores]
"__init__.py" = ["F401", "D104", "CPY001"] # module imported but unused; Missing docstring in public package
"docs/*" = [
"INP001", # File * is part of an implicit namespace package. Add an `__init__.py`.
Expand All @@ -82,16 +82,19 @@ ignore = [
"PLR6301", # Method * could be a function, class method, or static method
]

[pydocstyle]
[lint.pydocstyle]
convention = "google"

[pylint]
[lint.pylint]
max-args = 6

[flake8-copyright]
[lint.flake8-annotations]
mypy-init-return = true

[lint.flake8-copyright]
author = "Quantinuum LLC"

[flake8-type-checking]
[lint.flake8-type-checking]
quote-annotations = true

[format]
Expand Down

0 comments on commit fdbb56b

Please sign in to comment.