- explicit and use-site variance modifiers
In/Out/InOut
collections.User*should have__repr__
- cache modules that only have baseline errors
stubtest: the__bool__method of function parameter defaults will no longer be unnecessarily evaluated
- ban variance on
TypeVardefinitions (#817) - enforce
TypeVarconstraints on type applications (#817)
- check type args on type aliases (#817)
- cache modules that only have baseline errors
- fix dmypy in vscode
- fix
typing.Callable
- correct error code documentation regarding defaults
- typed
functools.wrapscorrectly - typed
builtins.ellipsis/types.EllipsisTypecorrectly - disable
bytearrayandmemoryviewpromotions by default - support
typing.type_check_only - support default values on type parameters
- support based type notation in type alias statements
- support
basedtyping.FunctionType
- fixed crash with
replugin - fixed crash with
Intersectioncache - fixed definition of
types.NoneType
- fixed default configuration in the docs
- Any parameter
_will be inferred asobject(#687) work_not_properly_function_namesmade available to per module configuration (#699)- Support
BASEDMYPY_TYPE_CHECKING(#702) - Enable stub mode within
TYPE_CHECKINGbranches (#702) - Infer from overloads - add default value in impl (#697)
- Warn for missing returns with explicit
Anyreturn types (#715)
- positional arguments on overloads break super (#697)
- positional arguments on overloads duplicate unions (#697)
- fix intersection type aliases (#716)
Callablesyntax ((int) -> str) (#619)FunctionTypesyntax (def (int) -> str) (#619)
Callableis no longertypes.FunctionType(#619)
- f-string format specs are checked (#543)
- Narrow type on initial assignment (#547)
- Annotations in function bodies are not analyzed as evaluated (#564)
- Invalid
casts show an error (#573) - Argument names are validated for subtypes (#562)
- Type-guards narrow in the negative (#553)
- Conditional types for asymmetric type-guards (#553)
- Static conditions report an error (#553)
- Regex groups are special-cased (#531)
- f-strings will show an error if the value doesn't define a stringification (#565)
- Show 'narrowed from' in
reveal_type(#550) --color-outputis enabled by default (#531)--idewill disable color-output (#531)- Output lines won't wrap if not connected to a terminal (#531)
- Render star args in error messages properly (#551)
- The first argument to
castis analyzed as evaluated (#564) - Decorated functions that return
Nonecorrectly warn when used (#572) - Some impossible type-guards were not reporting an error (#553)
- explicit-override is re-enabled by default
- type-guards have been reworked from the ground up (#516)
TypeGuardis retained in inferred types (#504)- Type narrowing is applied from lambda execution (#504)
--ideflag (#501)
show-error-context/prettyare now on by default (#501)- Show fake column number when
--show-error-end(#501) - Error messages point to basedmypy docs (#516)
Callabletypes in error messages don't containmypy_extensions(#516)
- Don't show "X defined here" when error context is hidden (#498)
- Fix issue with reveal code in ignore message (#490)
- Fixed union at join for same
typeliterals. (#488) - Don't report false
Anyexpressions when inferring lambda type (#515) - Correctly match overload when it contains an
Anyexpression (#515) - Fixed the variance of
Mappings key type (#527)
- Deprecate python 3.7 support (#457)
- Allow denotation of tuple types with tuple literals (#458)
- Removed
--legacyflag in favour of--no-strict(#445) default-returnis now enabled by default (#445)
- Removed
Anyfrom the typings forre.Matchgroup functions. (#459) - Ignore
Anyfrom unused__init__. (#321)
- Fix unsafe variance note (#452)
- Fix crash with baseline filtering (#471)
Intersectiontype (#357)
ignore-missing-py-typedto use types even if there is nopy.typed(#337)
- Errors regarding inferred functions didn't have a note (#394)
- Type ignored calls to incomplete functions left a phantom note (#395)
- Fix incorrect plural in summary message (#386)
- Baseline now stores the source code for better matching (#415)
- Duplicates are no longer stored in the baseline (#231)
- Support using
TypeVars in the bounds of otherTypeVars
- Similar errors on the same line will now not be removed
- Render generic upper bound with
:instead of<: - Render uninhabited type as
Neverinstead of<nothing> - Render Callables with
-> None
- Handle positional only
/parameters in overload implementation inference - Render inferred literal without
? - Fix infer from defaults for inner functions
- Allow literal
int,boolandEnums withoutLiteral
- Unionize at type joins instead of common ancestor
- Render Literal types better in output messages
ignore_any_from_errorsoption to suppressno-any-exprmessages from other errors- Function types are inferred from Overloads, overrides and default values. (no overrides for now sorry)
- Infer Property types
- Calls to incomplete functions are an error (configurable with
incomplete_is_typed) - Added a new type
Untyped, it's likeAny, but more specific - Added a dependency on
basedtyping
- Render types a lot better in output messages
types.NoneTypenow works as a value oftype[None]
default_returnoption to imply unannotated return type asNone.- Specific error codes for
Anyerrors - Automatic baseline mode, if there are no new errors then write.
- Ignore baseline with
mypy --baseline-file= src
- Baseline will ignore reveals (
reveal_typeandreveal_locals). --write-baselinewill report total and new errors.- Much better baseline matching.
- Unions in output messages show with new syntax
--legacyflag- new baseline format
- Strict by default(
--strictand disable dynamic typing) - add baseline support(
--write-baseline,--baseline-file) - Type ignore must specify error code
- Unused type ignore can be ignored
- Add error code for unsafe variance(
unsafe-variance)