continue-outside-loop
What it does
Section titled “What it does”Reports a continue that no loop of its function or class contains.
Why it matters
Section titled “Why it matters”Python rejects the file with SyntaxError: 'continue' not properly in loop, so no code in it runs.
To fix, remove the continue, or put the statement in the loop it is meant for.
Example
Section titled “Example”...
...continue...
...Configuration
Section titled “Configuration”python: lint: rules: continue-outside-loop: warn # off, warn (default), errorEnabled by the presets: python/ruff.
Suppress one line with sudsy-disable-next-line continue-outside-loop in a comment of the file’s language.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools; Sudsy reports what each upstream rule reports.
| Tool | Rule | Match |
|---|---|---|
| ruff | F702 |
full |