Skip to content

“Duplicate base class” blocks checking #15349

@xiaxinmeng

Description

@xiaxinmeng

The duplicate base class causes the checking blocked.

example.py

class N(type):
    pass

class B(N, metaclass=N):
    pass

class D(B, B):
    pass

The expected behavior:

The error can be ignored and the checking will not be blocked.

The actual behavior:

>> mypy example.py
Desktop/example.py:7: error: Duplicate base class "B"
Found 1 error in 1 file (errors prevented further checking)

Environment

Mypy version: 1.3.0
Python version: 3.11.3
Operating System: Ubuntu 18.04
How to install MyPy: "python3.11 -m pip install mypy"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions