Skip to content

Commit

Permalink
Remove deprecation warnings when running ruff (#746)
Browse files Browse the repository at this point in the history
  • Loading branch information
bvanelli authored Dec 8, 2024
1 parent e14de14 commit 9c9e1b4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions examples/ruff.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# This extend our general Ruff rules specifically for the examples
extend = "../pyproject.toml"

[lint]
extend-ignore = [
"T201", # Allow the use of print() in examples
]
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ max-attributes = 20
addopts = "--cov"
asyncio_mode = "auto"

[tool.ruff]
[tool.ruff.lint]
ignore = [
"ANN101", # Self... explanatory
"ANN102", # cls... just as annoying as ANN101
Expand All @@ -134,17 +134,17 @@ ignore = [
]
select = ["ALL"]

[tool.ruff.flake8-pytest-style]
[tool.ruff.lint.flake8-pytest-style]
fixture-parentheses = false
mark-parentheses = false

[tool.ruff.isort]
[tool.ruff.lint.isort]
known-first-party = ["demetriek"]

[tool.ruff.mccabe]
[tool.ruff.lint.mccabe]
max-complexity = 25

[tool.ruff.per-file-ignores]
[tool.ruff.lint.per-file-ignores]
"src/demetriek/models.py" = ["TCH002", "TCH003"]

[build-system]
Expand Down
1 change: 1 addition & 0 deletions tests/ruff.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# This extend our general Ruff rules specifically for tests
extend = "../pyproject.toml"

[lint]
extend-select = [
"PT", # Use @pytest.fixture without parentheses
]
Expand Down

0 comments on commit 9c9e1b4

Please sign in to comment.