tests/__init__ now puts the repository root and scripts/ on sys.path,
so no test module inserts them and every import sits in the import
block. ruff accepts the bare `import tests` the modules keep for its
side effects. The last suppressions go: helper test modules import as
tests.<name>, files open in with blocks, lambdas become functions.
pyproject.toml now carries the ruff rule set: pyflakes, the B rules,
simplify, perf, pyupgrade, complexity and size limits. This commit
applies the fixes that change no behavior and the small defects the
first run named:
- tests/test_install.py used argparse without importing it
- three loops rebound the outer `profile` with each layout
(packextras, slots, verify); the loop variable is now `layout`
- profile_sync loops shadowed dataclasses.field
- generate_readme and packextras computed values nothing read
- stale noqa markers for rules the project does not enforce
Complexity, size and the remaining findings are handled next.
A line opening on "Filter " stood for a filter box read whole, but the
installer page's key table has a row "Filter a long list". The reader
now counts a filter box that is not hidden. An MDX source writes the
space between two tags as {" "}: the reader of the generated sources
reads it as a space.
The word and the page title were split by a <br> only, which a copy,
textContent and an assistant read as "PreviousWhat the packs do not
hold". The override keeps Starlight's look, spaces them, names each link
by direction and page, and makes the pair a navigation landmark.
Generated and built pages read without the stylesheet, skipping hidden,
aria-hidden, scripts and styles: no step or figure text read twice, no
counter glued to a label, no empty picker, every laid out box spaced.
The build's filter box is compared with the generator's through node.