A class names object as its base, which every class already has
What it finds
class Point(object):: every class derives from object in Python 3, so naming it is a leftover from Python 2, where it made a new-style class.
The fix removes the base list, or only object from it, and is safe.
From the rule's source, object_base_class.rs.
class Point(object):tx0 reports: every class derives from object, so naming it as the base changes nothing pass class Line: pass class Shape(Point, object): pass Turn it on, off or suppress it
The rule runs from the strict tier up. To turn it on in a lower tier, give it a level in tx0.toml:
[rules]
"tx0/python:object-base-class" = "warning"To keep one finding, suppress it with a reason. tx0 suppress ID --reason "..." writes the comment on the line before the code:
# tx0: ignore[tx0/python:object-base-class] reason="..."tx0 explain tx0/python:object-base-class shows the same in the terminal. Found a false positive? Report it.