Skip to content

Request: split off Untyped decorator makes function "..." untyped from [misc] #19148

Description

@Avasam

Feature

When getting the error Untyped decorator makes function "..." untyped, I'd like for it to be a different error code than the catch-all misc

Pitch

In https://github.com/microsoft/python-type-stubs/, most of the hundreds of misc errors are due to untyped decorators. Reviewing whether each decorator should affect the signature (meaning it could just be removed in a stub), or typing them (typing decorators isn't easy or fast) would take a ton of effort. With the hundreds of violations, the entire misc category is ignored. This is unfortunate as there's other very valuable errors to be found in that category.

I could also see that code being disabled when mypy is used alongside another checker/language server that supports inferred return types and a decorator returning a callable class is used.

In partially typed projects, maintainers may opt out of this error if they find typing decorators to be too complex.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions