-
Notifications
You must be signed in to change notification settings - Fork 127
Closed
Description
Would you be interested in stricter type hint linting? I've implemented these additional mypy settings in another project already:
- check_untyped_defs "Type-checks the interior of functions without type annotations."
- disallow_any_generics "Disallows usage of generic types that do not specify explicit type parameters."
- no_implicit_optional "Changes the treatment of arguments with a default value of
Noneby not implicitly making their typeOptional." Basically, declaring a parameterfoo: str = Nonebecomes an error, rather than being implicitly treated asOptional[str]. - show_error_codes "Shows error codes in error messages." This makes it easier to write
type: ignore[SPECIFIER]comments (which are more specific than the big hammer,type: ignore), since theSPECIFIERpart of that is part of the error message. - warn_redundant_casts "Warns about casting an expression to its inferred type."
- warn_return_any "Shows a warning when returning a value with type
Anyfrom a function declared with a non-Anyreturn type." - warn_unused_ignores "Warns about unneeded
# type: ignorecomments."
I've also avoided ignore_missing_imports simply by marking only a handful of specific imports as ignored.
Metadata
Metadata
Assignees
Labels
No labels