Skip to content

Refactor inherit_names to work by inheritance #32100

Open
@SaturnFromTitan

Description

@SaturnFromTitan

We face a lot of mypy errors due to the dynamic nature of inherit_names. See issue #31716 and the discussion that evolved there.

Summary:
In the past, we added explicit type annotations to the respective classes, but this approach doesn't scale.

As mypy is a static type checker, it cannot understand the dynamic nature of inherit_names by design. The only alternative would be to refactor inherit_names to work by inheritance instead of dynamic assignments. This would make the code more understandable to humans as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Typingtype annotations, mypy/pyright type checking

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions