- check_budget.py escalated a hard index-row violation to 'warn' on both branches, so INDEX_ROW_HARD could never fail anything. It fails now, and tests/unit/test_budget_measurement.py pins both thresholds. - The corpus note counted scripts/__pycache__/*.pyc, so the same commit reported 27 scripts after the suite had run and 16 on a clean checkout. - TOKENS_PER_CHAR is re-derived from a measurement (26,795 chars -> 6,065 tokens = 4.418); the comment's old figure and its arithmetic were both wrong for this file. - check_repo.py's yaml sentinel carries the type ignore, so mypy is clean with PyYAML installed as well as without it. - The CPUID test now skips with the probe's own note on a host without CPUID instead of failing, and pytest.ini points at tests/README.md, which exists, instead of an EXTENSION file that never did. Tooling: .flake8 (a measured 120-column limit), .gitattributes, .gitignore and .github/workflows/ci.yml (the five gates, the suite on 3.11-3.14 and a lint job), which is what CONTRIBUTING.md already claimed CI runs. The pull-request template it refers to now exists. Content: pitfalls P26-P34 -- the analysis-level failures the catalogue was missing (sampling read as observation, a self-built parser trusted, a verification that could not have failed, a shell-mangled command line) -- registered in the symptom index and its routing mirror. FINDINGS F11-F15 record the defects above. Tests: the coverage guard derives its subject from scripts/ rather than a hand-written list, pe_triage.py and pe_diff.py gain their first tests, and plan.py / preflight.py are declared uncovered with reasons.
34 lines
1.7 KiB
INI
34 lines
1.7 KiB
INI
# flake8 configuration for this repository.
|
|
#
|
|
# Three settings, each with the measurement behind it rather than a preference.
|
|
#
|
|
# max-line-length = 120
|
|
# Measured before this file was added: the longest line across *.py and
|
|
# skills/exe-reverse/scripts/*.py is 110 characters (trace_reduce.py:666). 120 leaves room for a
|
|
# rule table or a format string written on one line without forcing a split inside a raw regex,
|
|
# which either changes the pattern or produces a concatenation harder to read than the long line.
|
|
# A line over 120 is a defect to look at, not a style disagreement.
|
|
#
|
|
# max-complexity is not set, and C901 is excluded below with the measurement: this repository's
|
|
# parsers and dispatchers are long flat if/elif chains over finding kinds and PE structures. Setting
|
|
# a threshold above the maximum would be a number chosen to pass rather than a standard; splitting
|
|
# them into one function per case would move the shape of the format away from the code that reads
|
|
# it, and looking like the specification is this repository's argument.
|
|
#
|
|
# extend-ignore:
|
|
# C901 see above -- reported here as a measurement, not enforced
|
|
# E203 slice whitespace (`data[start : end]`); flake8 and every autoformatter disagree, and the
|
|
# repository has no autoformatter
|
|
#
|
|
# Run from the repository root:
|
|
# flake8 *.py skills/exe-reverse/scripts/*.py
|
|
#
|
|
# Enforced in CI: the `lint` job in .github/workflows/ci.yml runs this exact command alongside mypy,
|
|
# on a bare interpreter, so the configuration is exercised in the poorest environment it must keep
|
|
# working in.
|
|
|
|
[flake8]
|
|
max-line-length = 120
|
|
extend-ignore = C901,E203
|
|
exclude = .git,__pycache__,tools,build,dist
|