Commit f840f0c
committed
lint: make check_no_print path-allowlist Windows-safe
The CLI-print allowlist compared paths via
\`str(rel).startswith(str(p) + \"/\")\`. On Windows this never
matched because \`str(rel)\` uses backslashes, so the CLI
allowlist silently failed and every \`print()\` in
\`geno_lewm/cli/verify.py\` was flagged as a violation, breaking
the gates job + two unit tests on every Windows runner.
Switch to component-tuple comparison (\`rel.parts[:n] == p.parts\`)
so the same allowlist matches on POSIX and Windows.
Confirmed by downloading the pytest artifact from the prior
Windows run; both failures (\`test_print_in_cli_dir_is_allowed\` and
\`test_real_package_passes\`) trace to this single AST-linter
regression. Local Linux suite still passes.1 parent 75b1960 commit f840f0c
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
57 | 61 | | |
58 | 62 | | |
59 | 63 | | |
| |||
0 commit comments