diff --git a/archeryutils/classifications/tests/test_agb_field.py b/archeryutils/classifications/tests/test_agb_field.py index ab82872..f21e067 100644 --- a/archeryutils/classifications/tests/test_agb_field.py +++ b/archeryutils/classifications/tests/test_agb_field.py @@ -263,7 +263,7 @@ class TestCalculateAgbFieldClassification: ), ], ) - def test_calculate_agb_field_classification( # noqa: PLR0913 Too many arguments + def test_calculate_agb_field_classification( self, roundname: str, score: float, diff --git a/archeryutils/classifications/tests/test_agb_outdoor.py b/archeryutils/classifications/tests/test_agb_outdoor.py index 1868718..6e45d21 100644 --- a/archeryutils/classifications/tests/test_agb_outdoor.py +++ b/archeryutils/classifications/tests/test_agb_outdoor.py @@ -388,7 +388,7 @@ class TestCalculateAgbOutdoorClassification: ), ], ) - def test_calculate_agb_outdoor_classification( # noqa: PLR0913 Too many arguments + def test_calculate_agb_outdoor_classification( self, score: float, roundname: str, @@ -482,7 +482,7 @@ def test_calculate_agb_outdoor_classification( # noqa: PLR0913 Too many argumen ), ], ) - def test_calculate_agb_outdoor_classification_prestige_dist( # noqa: PLR0913 Too many arguments + def test_calculate_agb_outdoor_classification_prestige_dist( self, score: float, roundname: str, diff --git a/archeryutils/handicaps/tests/test_handicaps.py b/archeryutils/handicaps/tests/test_handicaps.py index 8fbb7fd..9e3c1a4 100644 --- a/archeryutils/handicaps/tests/test_handicaps.py +++ b/archeryutils/handicaps/tests/test_handicaps.py @@ -146,8 +146,7 @@ def test_handicap_scheme_subclass_generation( hcclass: HandicapScheme, ) -> None: """Check that appropriate subclasses are generated by handicap_scheme().""" - # Comparison to type as mypy doesn't like mixing isinstance() & user-defined cls - assert type(hc.handicap_scheme(scheme)) == hcclass + assert type(hc.handicap_scheme(scheme)) == hcclass # noqa: E721 Comparison to type as mypy doesn't like mixing isinstance() & user-defined cls class TestSigmaT: diff --git a/archeryutils/rounds.py b/archeryutils/rounds.py index 57c7cca..4085d52 100644 --- a/archeryutils/rounds.py +++ b/archeryutils/rounds.py @@ -47,7 +47,7 @@ def __init__(self, n_arrows: int, target: Target) -> None: raise TypeError(msg) @classmethod - def at_target( # noqa: PLR0913 + def at_target( cls, n_arrows: int, scoring_system: ScoringSystem, @@ -195,7 +195,7 @@ class Round: """ - def __init__( # noqa: PLR0913 + def __init__( self, name: str, passes: Iterable[Pass], diff --git a/archeryutils/utils.py b/archeryutils/utils.py index d23f522..b216d01 100644 --- a/archeryutils/utils.py +++ b/archeryutils/utils.py @@ -20,8 +20,8 @@ def _get_sys_info() -> list: # pragma: no cover # get full commit hash commit = None if os.path.isdir(".git") and os.path.isdir("archeryutils"): - with subprocess.Popen( - 'git log --format="%H" -n 1'.split(" "), # noqa: S603 subprocess call this is safe + with subprocess.Popen( # noqa: S603 subprocess call this is safe + 'git log --format="%H" -n 1'.split(" "), stdout=subprocess.PIPE, stderr=subprocess.PIPE, ) as pipe: