Skip to content

Returning Unknown instead of Any for incomplete __getattr__ #13765

@Avasam

Description

@Avasam

I noticed we have quite a few

def __getattr__(name: str) -> Incomplete: ...

Wouldn't it be better to write as

def __getattr__(name: str): ...  # incomplete

So that type-checkers like Pyright in strict mode can warn about unknown types ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    project: policyOrganization of the typeshed projectstubs: false negativeType checkers do not report an error, but should

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions