mypy
mypy copied to clipboard
Optional static typing for Python
Planning to make the 1.5 release around middle of July. Please post here any issues you'd like to see fixed in the release, or PRs you'd like to have merged....
> Note: if you are reporting a wrong signature of a function or a class in > the standard library, then the typeshed tracker is better suited > for this...
**Bug Report** Currently i am working with a typeddict that is transforming to AttributeDict and i dont have a way to preserve typings. I am implementing a custom plugin for...
```py @overload def foo(a: Literal[True]) -> int: ... @overload def foo(a: Literal[False]) -> str: ... def foo(a: bool) -> object: ... a: bool reveal_type(foo(a)) # error: No overload variant of...
**Bug Report** I hope I got the title approximately right. In the example below, `mypy` does not seem to properly bind the return type of the decorated function (`int`) to...
**Bug Report** Mypy reports that higher-order functions with parameters of type `Type[Callable]` - or any subscripted variant - can't receive `Callable` (with compatible subscripts where needed) as arguments. **To Reproduce**...
I have a function `yield_programs`, and it calls a helper function `yield_actions`. Obviously they are a bit complicated; they were written like this for fun. They live together in the...
Mypyc needs `distutils` or `setuptools` to run, but Python 3.12 no longer bundles `distutils` ([PEP 632](https://peps.python.org/pep-0632/)). This seems to imply that we need to include `setuptools` as a dependency of...
This fixes the test case testFStringWithFormatSpecifierExpression on Python 3.12. Strip redundant empty string literal from AST generated from f-string. It's not generated on earlier Python versions and it seems fine...
After #5870 is done, it would be nice to also support the missing `silent` option in following imports... :)