Skip to content

new rule - non-decorator usage of final #3741

Description

@DetachHead

not sure how common this is, but ty has a check for it:

from typing import final

# error: Type checkers will not prevent subclassing when `final()` is called as a function
MyClass = final(type("MyClass", (), {}))


class Bar(MyClass): ... # no error

Metadata

Metadata

Assignees

No one assigned
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions