Skip to content

Commit

Permalink
pyproject remove unused ruff ignores
Browse files Browse the repository at this point in the history
  • Loading branch information
janosh authored and gpetretto committed Jan 20, 2025
1 parent 43a7b53 commit aeebffe
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 13 deletions.
10 changes: 0 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ ignore = [
"ANN", # TODO fix all ANN errors
"ARG", # TODO fix unused method argument
"BLE001",
"C408", # Unnecessary (dict/list/tuple) call - remove call
"C901", # function too complex
"COM812", # trailing comma missing
"D",
Expand All @@ -89,10 +88,8 @@ ignore = [
"G004", # logging uses fstring
"ISC001",
"N802", # TODO maybe fix these
"PD011", # pandas-use-of-dot-values
"PERF203", # try-except-in-loop
"PGH003",
"PLR0911", # too many returns
"PLR0912", # too many branches
"PLR0913", # too many arguments
"PLR0915", # too many statements
Expand All @@ -102,14 +99,7 @@ ignore = [
"PT013", # pytest-incorrect-pytest-import
"PTH", # prefer Pathlib to os.path
"RUF013", # implicit-optional
"S106",
"S110",
"S311",
"S324", # use of insecure hash function
"S507", # paramiko auto trust
"S602",
"SIM105", # contextlib.suppress(Exception) instead of try-except
"SLF", # private member accessed outside class
"T201", # print statement
"TD", # TODOs
"TRY003", # long message outside exception class
Expand Down
4 changes: 2 additions & 2 deletions src/qtoolkit/core/data_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,12 @@ def __new__(cls, *values):
obj._value_ = values[0]
for other_value in values[1:]:
cls._value2member_map_[other_value] = obj
obj._all_values = values
obj._all_values = values # noqa: SLF001
return obj

def __repr__(self):
return "<{}.{}: {}>".format(
self.__class__.__name__,
type(self).__name__,
self._name_,
", ".join([repr(v) for v in self._all_values]),
)
Expand Down
2 changes: 1 addition & 1 deletion src/qtoolkit/host/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def execute(self, command: str | list[str], workdir: str | Path | None = None):
command = " ".join(command)
workdir = str(workdir) if workdir else Path.cwd()
with cd(workdir):
proc = subprocess.run(command, capture_output=True, shell=True, check=False)
proc = subprocess.run(command, capture_output=True, shell=True, check=False) # noqa: S602
return proc.stdout.decode(), proc.stderr.decode(), proc.returncode

def mkdir(self, directory, recursive=True, exist_ok=True) -> bool:
Expand Down
1 change: 1 addition & 0 deletions tests/io/test_shell.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# ruff: noqa: SLF001
import pytest

try:
Expand Down
2 changes: 2 additions & 0 deletions tests/io/test_slurm.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# ruff: noqa: SLF001

from datetime import timedelta
from pathlib import Path

Expand Down

0 comments on commit aeebffe

Please sign in to comment.