WUT_Computer_Science/Programming
Krzysztof kuhy Rudnicki a8a2710ebd ECOTE and ECRYPT_PROJECT: zero findings, tests still green
kuhy chose the strict branch: no per-file-ignores at all, not even the S101
block that ruff's own docs and the rest of this fleet carry for test code. So
125 test assertions were rewritten to raise instead of assert.

Rather than 125 copies of `if x != y: raise AssertionError(...)`, each course
grows a small expect module -- expect_equal / expect_in / expect_true /
expect_false. That is also strictly better output than a bare assert here:
pytest's assertion rewriting does not reach into a helper, so the helper has
to print both values, and it does. The rewrite itself went through ast, not a
regex, because seven of ECOTE's asserts were wrapped over several lines.

Everything else in the two courses is gone as well:

- 66 argument and 37 return annotations on the translator, worked out from
  what each function actually returns rather than stamped on as Any --
  `list[str] | str` where a function returns "Error!" or the parsed columns.
- 16 prints became logger.error with %-style arguments. The messages still
  reach stderr with no basicConfig, via logging's last-resort handler, so the
  translator behaves exactly as before.
- Two `open()` calls became Path.open / Path.write_text, six RET504
  assign-then-return pairs collapsed, one 380-character expected-HTML literal
  split into implicitly concatenated pieces (it cannot be wrapped any other
  way, which is what ISC001 being off is for), and one block of commented-out
  code deleted.
- ECRYPT_PROJECT/__init__.py removed. It made the COURSE directory a package,
  which nothing imports, and it was the sole cause of `N999 Invalid module
  name: 'ECRYPT_PROJECT'`; with it gone, sieve is the top-level package and
  its name is fine.

Verified by running both, not by reading: ECOTE 26 tests pass and
`python -m translator.main --filename examples/complicated/table1.tex` still
writes the same HTML with the same three column-count warnings on stderr;
ECRYPT_PROJECT 99 tests pass.

Repo-wide: 3,686 findings -> 3,159.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172dj34FDpao6wsix8ZuCzE
2026-08-28 20:03:01 +02:00
..
AIS Split 19 over-cap LaTeX reports, proving each PDF is unchanged 2026-08-28 19:47:12 +02:00
BD2 Add a run.sh to every course, and fix the code that would not build 2026-08-28 18:37:55 +02:00
BSS Run all 33 safe courses; fix what that broke 2026-08-28 18:52:31 +02:00
E-PSYOPS Run all 33 safe courses; fix what that broke 2026-08-28 18:52:31 +02:00
EADS Add a run.sh to every course, and fix the code that would not build 2026-08-28 18:37:55 +02:00
EARIN Hold the coursework to the same lint bar as the tooling 2026-08-28 19:53:04 +02:00
ECOAR Add a run.sh to every course, and fix the code that would not build 2026-08-28 18:37:55 +02:00
ECOTE ECOTE and ECRYPT_PROJECT: zero findings, tests still green 2026-08-28 20:03:01 +02:00
ECRYPT Hold the coursework to the same lint bar as the tooling 2026-08-28 19:53:04 +02:00
ECRYPT_PROJECT ECOTE and ECRYPT_PROJECT: zero findings, tests still green 2026-08-28 20:03:01 +02:00
EGUI Add a run.sh to every course, and fix the code that would not build 2026-08-28 18:37:55 +02:00
EOOP Run all 33 safe courses; fix what that broke 2026-08-28 18:52:31 +02:00
EOPSY Split 19 over-cap LaTeX reports, proving each PDF is unchanged 2026-08-28 19:47:12 +02:00
EPFU Add a run.sh to every course, and fix the code that would not build 2026-08-28 18:37:55 +02:00
ERSMS-project Hold the coursework to the same lint bar as the tooling 2026-08-28 19:53:04 +02:00
NLP Hold the coursework to the same lint bar as the tooling 2026-08-28 19:53:04 +02:00
PBAD Hold the coursework to the same lint bar as the tooling 2026-08-28 19:53:04 +02:00
PORR Split 19 over-cap LaTeX reports, proving each PDF is unchanged 2026-08-28 19:47:12 +02:00
PSD Hold the coursework to the same lint bar as the tooling 2026-08-28 19:53:04 +02:00
psd_project Add a run.sh to every course, and fix the code that would not build 2026-08-28 18:37:55 +02:00
TRAK Hold the coursework to the same lint bar as the tooling 2026-08-28 19:53:04 +02:00
twm_4 Hold the coursework to the same lint bar as the tooling 2026-08-28 19:53:04 +02:00
USD Add a run.sh to every course, and fix the code that would not build 2026-08-28 18:37:55 +02:00
WDWR Hold the coursework to the same lint bar as the tooling 2026-08-28 19:53:04 +02:00
ZPOB Make ZPOB build: its essay was handed in without a bibliography 2026-08-28 19:18:11 +02:00