Skip to content

Unhelpful error "Invalid base class mypy(error)" #6372

@ghost

Description

The following sql-entity class was generated by sqlalchemy -- so this is the standard way to create such a class and operate it. However, mypy calls Base here an Invalid base class. But why? No further details are given, I see no such error described in mypy documentation, and googling "Invalid base class" doesn't lead me to any obvious results. I have no way to diagnose the problem.

from sqlalchemy.ext.declarative import declarative_base
Base = declarative_base()

class SomeClass(Base)
    ....

mypy version 0.660
python version 3.7.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions