mypy
mypy copied to clipboard
Optional static typing for Python
**Crash Report** If .mypy_cache doesn't exists `mypy .` works, but every next run when .mypy_cache exists give me AttributeError. Master branch has with problem. **Traceback** ``` mypy_reproduce/__init__.py:31: error: Argument 2...
There are situations where a variable can be either a list or a tuple (or more generally, a sequence), but it is used/unpacked in a tuple-like way. That is, the...
**Bug Report** Hello. Here's something I stumbled upon implementing an asyncio thing. It looks like an issue with ParamSpec and/or generics to me. **To Reproduce** ```python from asyncio import AbstractEventLoop,...
**Bug Report** Hello there, I am witnessing (rare) cases where mypy emits fewer errors when running on multiple files at the same time than when running on each file individually....
We should have both errors (for things that clearly violate the type system) and warnings (for style issues and things that are suspicious but not necessarily problems). There should be...
**Feature** My suggestion is to allow for a `default_types.py` file in the root of a python project. The file should contain a dictonary with the name, type combinations. Which could...
**Crash Report** When a asynchronous comprehension is outside of an asynchronous function, mypy crashes with an internal error. See the following example 'test.py' test.py: `[await asyncio.sleep(1, x) for x in...
Knowing the type of the expressions in the AST is useful for IDEs (and IDE plugins) to support autocompletion, for static analyzers and for refactoring tools. As a matter of...
Fixes #4617 This allows the following code to trigger the error `typeddict-unknown-key` ```python A = T.TypedDict("A", {"x": int}) def f(x: A) -> None: ... f({"x": 1, "y": "foo"}) # err:...
**Crash Report** I'm running mypy on my code but it fails with an `INTERNAL ERROR`. **Traceback** ``` $ mypy src/mt_devops tests --show-traceback src/mt_devops/cli/tasks/test.py:167: error: INTERNAL ERROR -- Please try using...