Skip to content

Commit

Permalink
chore: remove redundant per-file ignores
Browse files Browse the repository at this point in the history
  • Loading branch information
tartansandal committed Apr 25, 2024
1 parent 227d537 commit ccd537e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 19 deletions.
19 changes: 2 additions & 17 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -211,23 +211,8 @@ runtime-evaluated-decorators = [
]

[tool.ruff.lint.per-file-ignores]
"**/scripts/**" = ["S101", "T20"] # Allow assert and print statement in scripts.
".git-hooks/**" = ["T20"] # Allow print statement in scripts.
"tests/**" = [
"S101", # assert
"S104", # hardcoded-bind-all-interfaces
"S105", # hardcoded-password-string
"S106", # hardcoded-password-func-arg
"S107", # hardcoded-password-default
"S301", # suspicious-pickle-usage
"RUF018", # assignment-in-assert
]

# To import all fixtures from other conftests.
"conftest.py" = ["F401", "F403"]
# To import select fixtures from non-local conftests.
# Importing and using the fixture makes it be shadowed.
"test_*.py" = ["F401", "F811"]
# Open devnull without a context manager
"conftest.py" = ["SIM115"]

[tool.ruff.lint.isort]
section-order = [
Expand Down
4 changes: 2 additions & 2 deletions test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ def clean_redis():

def start_redis_server(port):
"""Helper function starting Redis server"""
devzero = open(os.devnull) # noqa: SIM115
devnull = open(os.devnull, "w") # noqa: SIM115
devzero = open(os.devnull)
devnull = open(os.devnull, "w")
proc = subprocess.Popen(
["/usr/bin/redis-server", "--port", str(port)],
stdin=devzero,
Expand Down

0 comments on commit ccd537e

Please sign in to comment.