verbose-raise
What it does
Section titled “What it does”Reports raise e in an except ... as e clause.
Why it matters
Section titled “Why it matters”raise e adds the current line to the traceback of the exception, so the output shows two places for one error. A bare raise re-raises it with the traceback as it was.
To fix, write raise.
Example
Section titled “Example”...try: passexcept ValueError as e: raise e
...Configuration
Section titled “Configuration”python: lint: rules: verbose-raise: warn # off (default), warn, errorEnabled by the presets: python/ruff.
Suppress one line with sudsy-disable-next-line verbose-raise 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 | TRY201 |
full |