Skip to content

Commit 43d2821

Browse files
committed
formatting for PR
1 parent 455ae51 commit 43d2821

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

archeryutils/handicaps/handicap_equations.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,9 @@ def sigma_r(
347347
return sig_r
348348

349349

350-
def s_bar(target_specs: dict[float, int], arw_rad: float, sig_r: FloatArray) -> FloatArray:
350+
def s_bar(
351+
target_specs: dict[float, int], arw_rad: float, sig_r: FloatArray
352+
) -> FloatArray:
351353
"""Calculate expected score directly from target ring sizes.
352354
353355
Parameters

archeryutils/handicaps/tests/test_handicaps.py

+5-6
Original file line numberDiff line numberDiff line change
@@ -808,9 +808,7 @@ def test_rounded_round_score(
808808
)
809809

810810
assert (
811-
hc_eq.score_for_round(
812-
test_round, 20.0, hc_system, hc_params, None, True
813-
)
811+
hc_eq.score_for_round(test_round, 20.0, hc_system, hc_params, None, True)
814812
== round_score_expected[0]
815813
)
816814

@@ -819,9 +817,10 @@ def test_calculation_custom_scoring(self):
819817
Check that score_for_round can be calculated for a round with custom scoring
820818
"""
821819

822-
assert hc_eq.score_for_round(
823-
kings_900_rec, 20.0, "AGB", hc_params, None, True
824-
) == 896.0
820+
assert (
821+
hc_eq.score_for_round(kings_900_rec, 20.0, "AGB", hc_params, None, True)
822+
== 896.0
823+
)
825824

826825

827826
class TestHandicapFromScore:

archeryutils/targets.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,14 @@
2424
"Custom",
2525
]
2626

27+
2728
class Rings(NamedTuple):
2829
"""Container for data on max and min scores on target face types."""
30+
2931
high: int
3032
low: int
3133

34+
3235
_scoring_system_data = {
3336
"5_zone": Rings(high=9, low=1),
3437
"10_zone": Rings(high=10, low=1),
@@ -330,6 +333,9 @@ def min_score(self) -> float:
330333
)
331334

332335
def get_face_spec(self) -> FaceSpec:
336+
# 1 too many branches. Makes sense due to different target faces => disable
337+
# Could replace with mapping face to lambda that returns spec
338+
# pylint: disable=too-many-branches
333339
"""Derive specifications for common/supported targets.
334340
335341
Returns
@@ -338,9 +344,6 @@ def get_face_spec(self) -> FaceSpec:
338344
Mapping of target ring sizes in [metres] to score
339345
"""
340346

341-
# 1 too many branches. Makes sense due to different target faces => disable
342-
# Could replace with mapping face to lambda that returns spec
343-
# pylint: disable=too-many-branches
344347
def _rnd6(value):
345348
return round(value, 6)
346349

0 commit comments

Comments
 (0)