Description
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
JelleZijlstra commentedon May 26, 2025
Seems like a good idea, in general it's good to get things out of misc if they're at all common.
import-untyped
and mostmisc
issues microsoft/python-type-stubs#378