* Add script to generate protoc stubs using mypy-protobuf generated stubs
* Use generate_proto_stubs to generate stubs for protobuf 3.14.0
* Skip _pb2.pyi from flake8,black,isort,pytype
Added empty stubs for xml.dom.minidom.parse and xml.dom.minidom.parseString, and other modules under xml.dom
Co-authored-by: Stephanie Ding <sym@fb.com>
Co-authored-by: Shantanu <hauntsaninja@users.noreply.github.com>
[tests/pytype_test.py](./tests/pytype_test.py#L176) is still using
Python `3.6`:
> python_version="2.7" if version == 2 else "3.6",
The test fails to run if `python3.6` is unavailable (for example on
Debian 10 Buster, which has 3.7).
According to (https://devguide.python.org/#status-of-python-branches
`3.6` is still maintained until end of 2021.
`pytype` itself [claims](https://github.com/google/pytype#requirements)
to run on `2.7`, `3.5`-`3.8`.
Change the script to use the version of Python from the invoking
interpreter.
The previous typing meant `threading.ExceptHookArgs` could not be used
to type a value.
The new typing follows what cpython does in the happy path (`_thread`
exists rather than the pure-python fallback being used).
Fixes#4767.
Change some tkinter function parameter types from bool to int.
Based on the fact that tk.{YES,NO,TRUE,FALSE} are defined as ints
and that the usage example in the source code also uses an int as a bool.
* AbbrPreprocessor subclasses BlockProcessor
* Remove members inherited from base classes
* Add missing markdown.Extension alias
* Add missing Markdown members
* Fix Extension.config type
* Fix Pattern.handleMatch type
At this point, it is too late to add methods to these semi-protocols as
it would break lots of existing code. Additionally, we are moving away
from these classes to finer-grained protocols anyway.
* typeshed: update stubtest version
Includes changes from https://github.com/python/mypy/pull/9680
I've already fixed all the true positives on typeshed.
* attempt to fix windows' _WarnFunction
Co-authored-by: hauntsaninja <>
We use tee and no longer try to delete the file based on exit code,
since we use data.trim now.
mypy_primer started failing silently because of changes in aiohttp, so
now we'll fail if the exit codes are not 0 or 1.
Note mypy_primer has --project-date to get around the problem of
breaking changes in projects, but I want to try and keep mypy_primer up
to date / get a feel for how bad this problem actually is.
Co-authored-by: hauntsaninja <>
The current annotations specify the `limits` argument as an `Optional[Tuple[int, int]]`; this is incorrect. The real `resource.prlimit()` function does not accept `None` for the `limits` argument; it is only possible to avoid specifying new resource limits by omitting `limits` completely.