Flake8 inline suppression — zero issues on QGIS Plugin Store scanner#102
Open
andures wants to merge 1 commit into
Open
Flake8 inline suppression — zero issues on QGIS Plugin Store scanner#102andures wants to merge 1 commit into
andures wants to merge 1 commit into
Conversation
…es and improve readability
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix: Flake8 inline suppression — zero issues on QGIS Plugin Store scanner
Summary
The QGIS Plugin Repository scanner was reporting 986 Flake8 issues after PR #98, even though
flake8 qols/returned 0 locally.Root cause: the store unpacks the plugin ZIP and runs
flake8 <plugin_dir>/in isolation.setup.cfglives at the repo root and is never included in the plugin ZIP, so the store never readsper-file-ignores.This PR moves all suppressions into the source files:
# flake8: noqa(file-level) on the 7 exec()-dispatched scripts.# noqa: <CODE>(line-level) on specific lines ingenerate_icons.pyandqols_dockwidget.py.qols_dockwidget.py.per-file-ignoresremoved fromsetup.cfg(now redundant;max-line-length = 119andexcluderetained for local use).Result: 0 issues both locally and in the store scanner. 432 tests pass unchanged.
Changes
qols/scripts/*.py(7 files)Added
# flake8: noqaimmediately after the closing'''of each module docstring:Eliminates 731 issues (F403/F405 star imports, F541, E231 math spacing, E402, E722, F841, W291). Safe because these files are static bundled assets run via
exec()— not importable modules. TD-03 will convert them to proper modules, at which point# flake8: noqais removed.Files changed:
approach-surface-UTM.py,take-off-surface_UTM.py,conical.py,inner-horizontal-racetrack.py,outer-horizontal.py,OFZ_UTM.py,TransitionalSurface_UTM.py.qols/assets/generate_icons.pyAdded
# noqa: E128to 5 continuation lines (19, 31, 45, 52, 72). The draw-call argument lists use visual alignment that PEP 8 flags as under-indented but is intentional for readability:qols/qols_dockwidget.pyW293 — fixed directly (5 lines: 882, 1064, 1069, 1079, 1084): removed invisible trailing spaces from blank lines inside the CSS multi-line string.
E128/E129 —
# noqa(3 lines: 849, 931, 1320): two list-comprehension continuations and oneifcondition use a style consistent with surrounding legacy code.E501 —
# noqa: E501(52 lines): all are debugprint()statements and long string literals that will be removed or converted tologgercalls in TD-02. Tagged individually rather than file-wide to preserve future E722/F401 detection.setup.cfgRemoved the three
per-file-ignoresblocks (scripts,qols_dockwidget.py,generate_icons.py). They were only effective locally and are now replaced by inline suppressions:Commits
5162e67