Skip to content

builtins.property not accepted as a valid type for subclassing #1529

Closed
@beckjake

Description

@beckjake

mypy doesn't like it when I subclass the builtin class property:

class blah(property):
    pass

Running mypy 0.4.1 or 9e4cfc8 against that file, I get:
test.py:1: error: Invalid type "builtins.property"

But you totally can subclass property and build yourself a customized property decorator.

Looking at some debugger statements it seems like the type has been classified as not being an instance of TypeInfo. I'm afraid I can't offer a PR to fix this because I have no idea where that should be happening.

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