mirror of
https://github.com/kuhyx/utils.git
synced 2026-11-12 08:31:01 +01:00
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:
parent
6641927dbe
commit
32c8a54045
@ -116,7 +116,7 @@ class Earner:
|
|||||||
def gaming_for(self, units: int) -> int:
|
def gaming_for(self, units: int) -> int:
|
||||||
"""Gaming minutes ``units`` earn, capped at ``max_units``."""
|
"""Gaming minutes ``units`` earn, capped at ``max_units``."""
|
||||||
count = self.capped(units)
|
count = self.capped(units)
|
||||||
if count == 0:
|
if not count:
|
||||||
return 0
|
return 0
|
||||||
return self.gaming_minutes + (count - 1) * self.extra_gaming_minutes
|
return self.gaming_minutes + (count - 1) * self.extra_gaming_minutes
|
||||||
|
|
||||||
|
|||||||
@ -84,7 +84,9 @@ def test_units_count_blocks_once_and_skip_forgeries(
|
|||||||
tmp_path: Path, key_file: Path
|
tmp_path: Path, key_file: Path
|
||||||
) -> None:
|
) -> None:
|
||||||
tampered = block("s1", 3, _at(19))
|
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] = [
|
rows: list[object] = [
|
||||||
block("s1", 1, _at(18, 15)),
|
block("s1", 1, _at(18, 15)),
|
||||||
block("s1", 2, _at(18, 30)),
|
block("s1", 2, _at(18, 30)),
|
||||||
|
|||||||
@ -106,7 +106,8 @@ disable = []
|
|||||||
[tool.pylint.design]
|
[tool.pylint.design]
|
||||||
min-public-methods = 0
|
min-public-methods = 0
|
||||||
max-module-lines = 1000
|
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]
|
[tool.pylint.typecheck]
|
||||||
generated-members = [
|
generated-members = [
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user