Skip to content

Commit

Permalink
ruff: add ignores for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jvansanten committed Nov 27, 2024
1 parent dbd4e38 commit 919e8e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -160,5 +160,8 @@ ignore = [
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
]

[tool.ruff.lint.per-file-ignores]
"tests/*" = ["RUF018"] # assignment in assert is just fine in tests

[tool.ruff.lint.flake8-unused-arguments]
ignore-variadic-names = true
2 changes: 1 addition & 1 deletion tests/test_PhotoAlertPlotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
def recent_alerts():
def gen():
dap = DevAlertConsumer(alert_filter=None)
dap.tar_file = tarfile.open(
dap.tar_file = tarfile.open( # noqa: SIM115
Path(__file__).parent.parent / "alerts" / "recent_alerts.tar.gz"
)
for item in dap.tar_file:
Expand Down

0 comments on commit 919e8e3

Please sign in to comment.