Skip to content

ambiguous-class-name

Pythonstyleno fixdefault: off

Reports a class named l, O or I.

In many fonts l (lower case L), I (upper case i) and the digit 1 look alike, and so do O and 0. A class with one of these names is hard to tell from a number or another name in x = O().

To fix, give the class a name that says what it is.

Reported
...
class I:
pass
...
python:
lint:
rules:
ambiguous-class-name: warn # off (default), warn, error

Suppress one line with sudsy-disable-next-line ambiguous-class-name in a comment of the file’s language.

The same check in other tools; Sudsy reports what each upstream rule reports.

Tool Rule Match
ruff E742 full