| 1 |
Packages, modules, functions, variables, classes and constants follow PEP 8 casing (snake_case, PascalCase, UPPER_SNAKE) (Mandatory) |
Pass |
PEP 8 casing; ruff N rules pass. get_mouse_click_coor keeps the assignment's name. |
| 2 |
Names state purpose in the domain's language; no unexplained abbreviations, no single-letter names outside tiny scopes (Mandatory) |
Pass |
Names state purpose; assignment names guessed_states and missing_states kept. |
| 3 |
Code is produced by the project's formatter and passes its linter with no unexplained suppressions (Mandatory) |
Pass |
ruff format and check clean, no suppressions in the new code. |
| 4 |
Every function and method signature is type-annotated, including -> None (Mandatory) |
Pass |
All new signatures annotated; mypy --strict passes. |
| 5 |
No bare except:, no swallowed exceptions; specific exceptions are raised and the cause is kept (raise ... from) (Mandatory) |
N-A |
No exception handling added; a missing data file raises to the caller. |
| 6 |
No mutable default arguments and no shadowed builtins (Mandatory) |
Pass |
No mutable defaults (Path defaults are immutable); no builtin shadowed. |
| 7 |
Files, locks and connections are managed with context managers (Mandatory) |
Pass |
No unmanaged resources; the window is closed in a finally in main(). |
| 8 |
Public modules, classes and functions have docstrings that say what, not how (Optional) |
Pass |
Doxygen @param/@return on find_widgets, focus_dialog and the DialogWidget protocol. |
| 9 |
Logging uses logging, not print; no secrets or personal data in log output (Mandatory) |
Pass |
Click coordinates use logging; no print in the package. |
| 10 |
Classes and operations trace to the Design Class Diagram they implement; deviations are recorded (Mandatory) |
N-A |
No Design Class Diagram exists; the Protocol and TurtleScreen are recorded in the module docstrings. |
| 11 |
Tests exist for new behaviour, are named for the behaviour, and do not depend on order or the network (Mandatory) |
Pass |
4 new display-free tests with a FakeWidget (nested search, lift and focus, newest dialog, no dialog). ask_state_name needs a display and is verified by the throwaway focus script and S01's manual play. |
| 12 |
Type checker runs in strict mode without errors; Any is justified in a comment (Optional) |
Pass |
mypy strict reports no issues. |
| 13 |
Dependencies are declared and pinned in the project's dependency file, none unused (Optional) |
Pass |
No runtime dependencies. |
| 14 |
Each piece of knowledge (a business rule, constant, format, validation or query) is defined in one place; code is merged only where it expresses the same knowledge, not where it merely looks alike (Mandatory) |
Pass |
Delay and Tk class names are defined once in constants.py. |
| 15 |
Imports point inward: business-rule modules import no framework, database, UI or delivery-mechanism code, and there are no import cycles (Mandatory) |
Pass |
No module-level tkinter import; turtle stays lazy; the helpers work on a Protocol. |
| 16 |
SOLID holds: a class or module has one reason to change; new behaviour is added by extension, not by editing a type test in several places; subclasses honour the contract of their base; protocols are narrow; high-level code depends on protocols or abstract types and receives its implementations (Mandatory) |
Pass |
Focus handling is two small functions in the screen module; the game loop is unchanged. |