earned_time 0.5.0: pylint/no-noqa fixes (max-attributes 12 for the Earner record)

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Krzysztof Rudnicki 2026-10-09 20:55:02 +02:00
parent 6641927dbe
commit 32c8a54045
3 changed files with 6 additions and 3 deletions

View File

@ -116,7 +116,7 @@ class Earner:
def gaming_for(self, units: int) -> int:
"""Gaming minutes ``units`` earn, capped at ``max_units``."""
count = self.capped(units)
if count == 0:
if not count:
return 0
return self.gaming_minutes + (count - 1) * self.extra_gaming_minutes

View File

@ -84,7 +84,9 @@ def test_units_count_blocks_once_and_skip_forgeries(
tmp_path: Path, key_file: Path
) -> None:
tampered = block("s1", 3, _at(19))
tampered["detail"] = {**tampered["detail"], "active_seconds": 9000} # type: ignore[dict-item]
detail = tampered["detail"]
assert isinstance(detail, dict)
tampered["detail"] = {**detail, "active_seconds": 9000}
rows: list[object] = [
block("s1", 1, _at(18, 15)),
block("s1", 2, _at(18, 30)),

View File

@ -106,7 +106,8 @@ disable = []
[tool.pylint.design]
min-public-methods = 0
max-module-lines = 1000
max-attributes = 10
# Earner is a frozen registry record: its fields are the policy (cf. music_theory).
max-attributes = 12
[tool.pylint.typecheck]
generated-members = [