Skip to content

[feature request] final classes and member functions #2032

Closed
@dgoldstein0

Description

@dgoldstein0

In some languages (e.g. java) it's possible to declare a class as final so that it can't be subclassed; similarly, it's possible to declare functions as final so that they can't be overridden by sublclasses. It would be great if mypy could support this - so that classes could be annotated as final or their functions as final.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions