mypy
mypy copied to clipboard
Optional static typing for Python
This is an experiment to see if we can remove https://github.com/python/mypy/blob/790e8a73d8671a41cae419b4ea07579bfb2bc292/misc/sync-typeshed.py#L185 and https://github.com/python/mypy/blob/790e8a73d8671a41cae419b4ea07579bfb2bc292/misc/generate_changelog.py#L82. /cc @AlexWaygood
Fixes #1484 Turns out that this is currently the second most popular mypy issue (and first most popular is a type system feature request that would need a PEP). I'm...
**Feature** Make `dmypy` look for either its status file or maybe even the socket in a well-known place. As this well-known place I propose for Linux systems a directory `/run/user/$UID/mypy`...
**Bug Report** The JUnit XML generated by MyPy is invalid. **To Reproduce** Create a list without a type annotation and generate a JUnit XML report using MyPy. ```python def dummy_function():...
Cross-ref python/peps#3649.
```py # foo.py if bool(): a = 1 ``` ```py # bar.py from foo import a # no error, crashes at runtime ``` i would expect an error like `Name...
**Crash Report** mypy runs into a segfault when using a `TypeVar` like this: ```py T = TypeVar("T", bound=Callable[..., "T"]) ``` **Traceback** Unfortunately, nothing useful shows up: ```sh $ mypy --show-traceback...
**Bug Report** The Python docs website document `enum` items as [iterables](https://docs.python.org/3/library/enum.html#enum.EnumType.__iter__): ```python >>> Animal = Enum('Animal', 'ANT BEE CAT DOG') >>> Animal >>> Animal.ANT >>> list(Animal) [, , , ]...
For developing an _Either_-like monad that types correctly and also behaves nicely at runtime I currently use the following pattern to independently declare the types for mypy and the runtime...