The goal of the roadmap is to document areas the mypy core team is planning to work on in the future or is currently working on. PRs targeting these areas are very welcome, but please check first with a core team member that nobody else is working on the same thing.
Note: This doesn’t include everything that the core team will work on, and everything is subject to change. Near-term plans are likely more accurate.
-
Add more comprehensive testing for
--incremental
and--quick
modes to improve reliability. At least write more unit tests with focus on areas that have previously had bugs. (issue) -
Speed up
--quick
mode to better support million+ line codebases through some of these:-
Make it possible to use remote caching for incremental cache files. This would speed up a cold run with no local cache data. We need to update incremental cache to use hashes to determine whether files have changes to allow sharing cache data.
-
See if we can speed up deserialization of incremental cache files. Initial experiments aren’t very promising though so there might not be any easy wins left. (issue)
-
-
Improve support for complex signatures such as
open(fn, 'rb')
and specific complex decorators such ascontextlib.contextmanager
through type checker plugins/hooks. (issue) -
Document basic properties of all type operations used within mypy, including compatibility, proper subtyping, joins and meets. (issue)
-
Make TypedDict an officially supported mypy feature. This makes it possible to give precise types for dictionaries that represent JSON objects, such as
{"path": "/dir/fnam.ext", "size": 1234}
. (issue) -
Make error messages more useful and informative. (issue)
-
Resolve #2008 (we are converging on approach 4).
-
Invest some effort into systematically filling in missing annotations and stubs in typeshed, with focus on features heavily used at Dropbox. Better support for ORMs will be a separate project.
-
Improve opt-in warnings about
Any
types to make it easier to keep code free from unwantedAny
types. For example, warn about usinglist
(instead ofList[x]
) and callingopen
if we can’t infer a precise return type, or using types imported from ignored modules (they are implicitlyAny
). -
Add support for protocols and structural subtyping (PEP 544).
-
Switch completely to pytest and remove the custom testing framework. (issue)
-
Make it possible to run mypy as a daemon to avoid reprocessing the entire program on each run. This will improve performance significantly. Even when using the incremental mode, processing a large number of files is not cheap.
-
Refactor and simplify specific tricky parts of mypy internals, such as the conditional type binder, symbol tables or the various semantic analysis passes.
-
Implement a general type system plugin architecture. It should be able to support some typical ORM features at least, such as metaclasses that add methods with automatically inferred signatures and complex descriptors such as those used by Django models. (issue)
-
Add support for statically typed protobufs.
-
Provide much faster, reliable interactive feedback through fine-grained incremental type checking, built on top the daemon mode.
-
Start work on editor plugins and support for selected IDE features.