We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d7ebe2e commit 1ee28d8Copy full SHA for 1ee28d8
mypy/mro.py
@@ -32,8 +32,7 @@ def linearize_hierarchy(
32
return info.mro
33
bases = info.direct_base_classes()
34
if not bases and info.fullname != "builtins.object" and obj_type is not None:
35
- # Probably an error, add a dummy `object` base class,
36
- # otherwise MRO calculation may spuriously fail.
+ # If no base classes are found, and obj_type is provided, we use obj_type to provide a base.
37
bases = [obj_type().type]
38
lin_bases = []
39
for base in bases:
0 commit comments