Shantanu
Shantanu
Fixes #11237 This is the script I used: https://raw.githubusercontent.com/hauntsaninja/snippets/main/pep570.py I haven't looked through the entire diff, let's see stubtest
It looks like it currently targets 3.10. Targeting 3.11 (or 3.12) makes use of `assert_type` just a tiny bit easier. The new conformance tests in https://github.com/python/typing make heavy use of...
I wanted to check some aspect of PEP 698. Since pyre is the reference implementation, https://pyre-check.org/play/ seemed like it would be convenient. However, my attempts to import the `override` symbol...
pip does this by default (you can opt out with `--no-compile`). Without this, you pay the cost on first import, which is undesirable in various situations. (Also a thing to...
I find the one-shot APIs (which are what I most commonly have cause to reach for) are slightly buried in the docs, on the second page of "Miscellaneous APIs": https://python-zstandard.readthedocs.io/en/latest/misc_apis.html
`--namespace-packages` runs into an issue if we import from `__init__.py` explicitly. For instance, given: ``` . └── proj ├── __init__.py └── a.py $ cat proj/__init__.py x: int $ cat proj/a.py...
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...
This came up in https://github.com/python/typeshed/pull/6762 ```python from typing import Any, TypeVar, Union T = TypeVar("T") V = TypeVar("V", str, bytes) def check_t(x: T | list[T]) -> T: ... def check_v(x:...
It's unclear to me mypyc thinks it needs an explicit annotation here ``` def bar() -> str | None: return "asdf" def foo() -> None: p = bar() if p...
This makes type checking PEP 484 compliant (as of 2018). mypy will change its defaults soon. See: https://github.com/hauntsaninja/no_implicit_optional https://github.com/python/mypy/issues/9091 https://github.com/python/mypy/pull/13401