multiple-imports-on-one-line
What it does
Section titled “What it does”Reports an import that names several modules, as in import os, sys.
Why it matters
Section titled “Why it matters”One import per line gives one line per change in a diff, and a merge conflict or a removed import touches one line.
To fix, write one import per module.
Example
Section titled “Example”import os, sysimport osimport os.path as p, refrom a import b, cConfiguration
Section titled “Configuration”python: lint: rules: multiple-imports-on-one-line: warn # off (default), warn, errorSuppress one line with sudsy-disable-next-line multiple-imports-on-one-line 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 | E401 |
full |