Mypy 0.910 released
22 Jun 2021: Mypy 0.910 was released. This release includes the --non-interactive command-line option to install stubs without user interaction, plus other fixes and improvements. Python 3.5 is now deprecated. Read the blog post for the details.
Mypy 0.901 released
8 Jun 2021: Mypy 0.901 was released. This release moves third-party library stubs to stub packages, allowing newer stubs to be easily used without updating mypy. Mypy now supports pyproject.toml and type guards, and ships wheels for Apple Silicon. Plus, there are many other features and bug fixes. Read the blog post for the details.
0.790:
Bug Fixes
Fix disable_error_code config file option
Fix partial type crash during protocol checking
Store the type for assignment expression
Always type check arguments when using --disallow-untyped-calls
Make None compatible with Hashable
Don't infinite loop on self dependencies in --follow-imports=normal
Don't simplify away Any when joining union types
Check for deleted vars in raise from
Fix corner case for comparing nested overloads
Fix issues with async for and with statements
Fix internal error on list/dict comprehension with walrus operator in global scope
Fix propagation of module-specific options to the parser
Fix crash when super is called outside a method
Fix untyped decorator overload error on class decorator with __call__ overloads
Clean up terminal width handling
Add keyword arguments for functional Enum API
Validate follow_imports values in mypy.ini
Fix *expr in an assigned expression
Don't consider comparing True and False as a dangerous comparison
Make reveal_type work with call expressions returning None
Error Reporting Improvements
Improve missing module error for subdirectories
Clarify bytes formatting error messages
Fix misleading follow_imports error message in dmypy
Use [arg-type] error code for additional argument type error messages
Report some additional serious errors in junit.xml
Report note about binary operation on the same location as error message
Documentation Updates
Document disable_error_code config file option
Add cross references to config file values
Add cross references to additional config values, and missing plugins config value, and document --help option for stubgen
Remove note that Final is experimental and suggest importing it from typing
Discuss unreachable code as a common issue
Stubgen Improvements
Improve property type detection in extension modules
Fix type stubgen crash caused by invalid type annotation
Import Iterable and Iterator from typing in generated stubs
Other Improvements
Speed up type checking of unions containing many literal string types
Add scripts to misc/
Mypy 0.750 was released. This release has better support for self-types, improved stub generator, experimental static inference of annotations, and other improvements and bug fixes. Read the blog post for more details.
Mypy 0.720 was released. This release uses the new semantic analyzer by
default, adds a flag to warn about unreachable code, and has other improvements
and bug fixes.
0.711:
The following two issues in mypy 0.710 were fixed:
Revert typeshed (“Define functools.partial as overloaded function instead of its own class”). This caused too many false positive errors in real-world code.
Fix MYPYC_BLACKLIST on Windows. This broke running dmypy on Windows.
Mypy 0.670:
New Feature: Variable Redefinition
Stubgen Improvements
Other Improvements
- Expand getting started docs to discuss type hints in more detail
- Always infer in operator as returning bool
- Allow star args in ctypes.Array constructor
- Fix plugin invocation for __call__ methods
- Implement the XDG directory spec for config files: $XDG_CONFIG_HOME/mypy/config is now included in the search path for config files
- When using the --junit-xml flag, the Python version and platform in the junit.xml file are now formatted as mypy-py3_6-windows — previously this was mypy-py3.6-windows but the dot was misinterpreted by some tools
- Update the typed_ast dependency to version 1.3.1; this means we now officially support Python 3.7
- Temporarily delete pyproject.toml from the repo in order to work around a pip bu g
- Include mypy_bootstrap.ini in PyPI packages
0.660:
- Literal Types
- Quick Mode Removed
- Plugin Improvements
* Add documentation for plugin system
* Make name lookup available to all plugin hooks
* Add more information to FunctionContext and MethodContext
- Other Improvements and Notable Bugs Fixed
* Introduce an optional sqlite backed incremental cache, enabled with --sqlite-cache
* Fix a daemon crash when there is a decode error
* Allow setting python_executable from config file
* Short-circuit if expression for always true/always false variables and MYPY/TYPE_CHECKING
* Don't map actual kwargs to formal *args
* Disable cache when producing reports
* Fix issues with pointer arrays in the ctypes plugin
* Support kw_only=True in the attrs plugin
* Fix some daemon crash bugs
* Better error messages when __eq__ has unexpected signature
* Collect additional timing stats and allow reporting them from the daemon
* Fix dmypy run when bad options passed to mypy
* Improve error messages from multiple inheritance compatibility checks
* Fix an incremental mode crash that can occur in situations with import cycles and star imports
Add type annotations to your Python programs, and use mypy to type check them.
Mypy is essentially a Python linter on steroids, and it can catch many
programming errors by analyzing your program, without actually having to run
it. Mypy has a powerful type system with features such as type inference,
gradual typing, generics and union types.