| 1 |
Packages, modules, functions, variables, classes and constants follow PEP 8 casing (snake_case, PascalCase, UPPER_SNAKE) |
Pass |
Classes Snake, Food, Scoreboard, Segment, ScreenLike, FoodLike, ScoreboardLike in PascalCase; functions and methods in snake_case; constants in UPPER_SNAKE; the ruff N (pep8-naming) rules pass. |
| 2 |
Names state purpose in the domain's language; no unexplained abbreviations, no single-letter names outside tiny scopes |
Pass |
Names are the lecture's and the dictionary's: create_snake, add_segment, extend, hits_wall, hits_tail, refresh, increase_score, update_scoreboard, game_over, eat_food_if_close, end_game_if_over, game_is_on. The same names appear in DICT-001. The only single-letter names are the parameters x and y of goto and distance in the Segment protocol, which mirror the turtle API (found with an AST search). |
| 3 |
Code is produced by the project's formatter and passes its linter with no unexplained suppressions |
Pass |
ruff format --check src tests reports 13 files already formatted; ruff check src tests reports all checks passed (rules E, F, W, I, N, UP, B, SIM); a search found no noqa and no type: ignore. |
| 4 |
Every function and method signature is type-annotated, including -> None |
Pass |
mypy in strict mode reports no issues in 13 source files, which fails on an unannotated definition. Protocols (Segment, ScreenLike, FoodLike, ScoreboardLike) type the turtle objects so that the logic can take fakes. |
| 5 |
No bare except:, no swallowed exceptions; specific exceptions are raised and the cause is kept (raise ... from) |
Pass |
The only handler is except (Terminator, TclError) in main.main. It names two specific types, catches an external signal that the player closed the window, is explained in the docstring and in a comment, and a test covers the quiet exit. Nothing is raised, so there is no cause to keep. The convention warns against exceptions as normal control flow; here the window toolkit raises them, so S01 may want to confirm the decision. |
| 6 |
No mutable default arguments and no shadowed builtins |
Pass |
The only default argument is `segment_factory: ... |
| 7 |
Files, locks and connections are managed with context managers |
N-A |
The modules open no file, lock or connection. |
| 8 |
Public modules, classes and functions have docstrings that say what, not how |
Pass |
Every module, class, function and method has a Doxygen docstring or ## comment; doxygen Doxyfile ends with 0 warnings (the Doxyfile fails the build on any warning). |
| 9 |
Logging uses logging, not print; no secrets or personal data in log output |
Pass |
A search found no print and no logging in src; the token values of .env occur in no tracked file. |
| 10 |
Classes and operations trace to the Design Class Diagram they implement; deviations are recorded |
Pass |
No Design Class Diagram exists in this project; the classes and operations trace to the day-21 lectures, to the base and to tasks 2 to 5 of MIL-002. The deviation is recorded in the Traceability section of MIL-002. |
| 11 |
Tests exist for new behaviour, are named for the behaviour, and do not depend on order or the network |
Pass |
pytest runs 128 tests (91 test functions, some parametrized), all green, none opens a window. The fake turtle and tkinter modules are installed with monkeypatch.setitem, which pytest undoes after each test. Each test file passes alone, and all files pass in reverse order. One test starts a fresh interpreter to prove that importing main loads no display module; it uses no network. |
| 12 |
Type checker runs in strict mode without errors; Any is justified in a comment |
Pass |
strict = true; python -m mypy ends with "Success: no issues found in 13 source files". Any occurs only as the return type of make_food and make_scoreboard in tests/fakes.py, each with a docstring that says why. |
| 13 |
Dependencies are declared and pinned in the project's dependency file, none unused |
Pass |
No new dependency: the code uses the standard library only (random, time, turtle, tkinter, typing, collections.abc). The dev extra is as reviewed in RC-007. |