Skip to content

Commit

Permalink
update ruff again
Browse files Browse the repository at this point in the history
  • Loading branch information
jsstevenson committed Feb 5, 2024
1 parent 996dcc6 commit 4b6b4c9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ repos:
- id: trailing-whitespace
- id: end-of-file-fixer
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.15
rev: v0.2.0
hooks:
- id: ruff-format
- id: ruff
Expand Down
13 changes: 6 additions & 7 deletions python/{{cookiecutter.project_slug}}/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ dynamic = ["version"]

[project.optional-dependencies]
tests = ["pytest", "pytest-cov"]
dev = ["pre-commit", "ruff==0.1.15"]
dev = ["pre-commit", "ruff==0.2.0"]
{% if cookiecutter.add_docs %}
docs = [
"sphinx==6.1.3",
Expand Down Expand Up @@ -64,6 +64,8 @@ branch = true

[tool.ruff]
src = ["src"]

[tool.ruff.lint]
{% if cookiecutter.add_docs %}exclude = ["docs/source/conf.py"]{% endif %}
select = [
"F", # https://docs.astral.sh/ruff/rules/#pyflakes-f
Expand Down Expand Up @@ -108,8 +110,6 @@ fixable = [
"SIM",
"RUF"
]

# ANN101 - missing-type-self
# ANN003 - missing-type-kwargs
# D203 - one-blank-line-before-class
# D205 - blank-line-after-summary
Expand All @@ -126,17 +126,16 @@ fixable = [
# S321 - suspicious-ftp-lib-usage
# *ignored for compatibility with formatter
ignore = [
"ANN101", "ANN003",
"ANN003",
"D203", "D205", "D206", "D213", "D300", "D400", "D415",
"E111", "E114", "E117", "E501",
"W191",
"S321",
]

[tool.ruff.per-file-ignores]
[tool.ruff.lint.per-file-ignores]
# ANN001 - missing-type-function-argument
# ANN102 - missing-type-cls
# ANN2 - missing-return-type
# S101 - assert
# B011 - assert-false
"tests/*" = ["ANN001", "ANN102", "ANN2", "S101", "B011"]
"tests/*" = ["ANN001", "ANN2", "S101", "B011"]

0 comments on commit 4b6b4c9

Please sign in to comment.