Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Avasam opened this issue May 26, 2025 · 1 comment
Open
Labels

Comments

@Avasam
Copy link
Contributor

Avasam commented May 26, 2025

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.

@Avasam Avasam added the feature label May 26, 2025
@JelleZijlstra
Copy link
Member

Seems like a good idea, in general it's good to get things out of misc if they're at all common.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants