Restore max-attributes 10, drop pylint disables

Group the research-tick test's Steam mocks, the last class over 10.
pylint now rates 10.00 with no inline disables and max-attributes back
at the repo's original 10.

Todo: 9b9342ba

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Krzysztof Rudnicki 2026-11-12 08:40:30 +01:00
parent 749f12ca27
commit 3e53cf3686
3 changed files with 19 additions and 17 deletions

View File

@ -176,11 +176,9 @@ disable = [
[tool.pylint.design]
min-public-methods = 0
max-module-lines = 250
# 15 = the widest persisted record (config.Config). Config, State and
# PlaytimeState are flat JSON files the live daemon reads and writes; WebGame
# is the UI's row shape. Splitting them under 10 would change the on-disk shape
# or hide it behind property forwarders written only for this check.
max-attributes = 15
# 10, the repo's original value: wider persisted records group their
# fields into nested dataclasses and keep a flat on-disk JSON shape.
max-attributes = 10
[tool.pylint.typecheck]
generated-members = [

View File

@ -22,6 +22,16 @@ BLOCK = "steam_backlog_enforcer._total_block"
NOW_PATCH = "steam_backlog_enforcer._research_window.now"
@dataclass
class SteamMocks:
"""The pass's Steam package effects."""
installed: MagicMock
kill: MagicMock
uninstall: MagicMock
purge: MagicMock
@dataclass
class Mocks:
"""The collaborators of one pass, all stand-ins."""
@ -30,14 +40,11 @@ class Mocks:
reconcile: MagicMock
launchers: MagicMock
counted: MagicMock
steam_installed: MagicMock
enforce: MagicMock
guard: MagicMock
notify: MagicMock
restore_store: MagicMock
steam_kill: MagicMock
steam_uninstall: MagicMock
steam_purge: MagicMock
steam: SteamMocks
@pytest.fixture
@ -63,14 +70,11 @@ def tm(total_block_paths: Paths) -> Iterator[Mocks]:
reconcile,
launchers,
counted,
installed,
enforce,
guard,
notify,
restore_store,
steam_kill,
steam_uninstall,
steam_purge,
SteamMocks(installed, steam_kill, steam_uninstall, steam_purge),
)

View File

@ -72,9 +72,9 @@ class TestOpenWindow:
"""Test that the destructive half of the block stays off."""
window.write_record(make_record())
run_pass()
tm.steam_kill.assert_not_called()
tm.steam_uninstall.assert_not_called()
tm.steam_purge.assert_not_called()
tm.steam.kill.assert_not_called()
tm.steam.uninstall.assert_not_called()
tm.steam.purge.assert_not_called()
def test_other_launchers_and_counted_games_are_still_killed(
self, tm: Mocks
@ -105,7 +105,7 @@ class TestOpenWindow:
self, tm: Mocks
) -> None:
"""Test that the install gap does not scan an absent library."""
tm.steam_installed.return_value = False
tm.steam.installed.return_value = False
window.write_record(make_record())
run_pass()
tm.enforce.assert_not_called()