Commit Graph

517 Commits

Author SHA1 Message Date
Sebastian Rittau
54a0bd80ee Add a comment about _typeshed to VERSIONS (#5447) 2021-05-19 11:01:33 +02:00
Jake Bailey
0351168b40 Bump pyright to 1.1.140 (#5480) 2021-05-16 19:20:18 -07:00
Sebastian Rittau
35acd2ad6f check_consistent: allow dots in module names (#5472) 2021-05-16 11:01:00 -07:00
hatal175
b8e5f637b9 Stubtest fixes (#5391) 2021-05-13 18:20:55 -07:00
Sebastian Rittau
3ba35f3552 Split the tests section, extend ToC (#5433)
Move and consolidate venv setup and running isort/black/flake8 into
separate sections and link those sections from the ToC. Also extend
those sections slightly.

Move the tests section into a separate file.

Make venv name in pre-commit match name in CONTRIBUTING.
2021-05-13 15:41:04 +02:00
github-actions[bot]
15e31fe54b Remove unused stubtest whitelist entries (#5431) 2021-05-12 22:22:32 -07:00
Sebastian Rittau
2f30adad19 Remove two files from pytype's exclude list (#5427) 2021-05-12 11:58:48 -07:00
Sebastian Rittau
6a4583d0a8 Deprecate pallets stubs (#5424)
Part of #5423

* Support new metadata fields in check_consistent
2021-05-12 19:17:42 +03:00
Shantanu
6bb1d885c6 time: fix constants availability (#5419) 2021-05-12 08:35:39 +02:00
github-actions[bot]
a2d5f72e8a Remove unused stubtest whitelist entries (#5418)
Co-authored-by: hauntsaninja <hauntsaninja@users.noreply.github.com>
2021-05-11 22:25:19 -07:00
Shantanu
4df940f96d Update allowlists (#5417)
Co-authored-by: hauntsaninja <>
2021-05-11 22:11:48 -07:00
Shantanu
5e6fb40b56 Fix stubtest unused script (#5411)
Contrary to the comment, this wasn't a mypy_primer issue, nor even a
stubtest issue.

Co-authored-by: hauntsaninja <>
2021-05-11 09:24:37 +03:00
Shantanu
0ac3531a93 Update allowlists (#5409)
Co-authored-by: hauntsaninja <>
2021-05-10 22:19:31 -07:00
Akuli
272d70cdd2 Fix several problems in stubtest unused (#5401) 2021-05-10 18:50:37 +02:00
Sebastian Rittau
1eb64b4372 Mark stdlib modules with upper version bounds (#5394)
* Mark stdlib modules with upper version bounds

* Add minus to all versions and enforce in check_consistent

* Fix check_consistent and mypy_test to work with new VERSIONS format
2021-05-10 16:29:43 +03:00
hatal175
244fc622e6 Add workflow stubtests for macos (#5384)
* Add macos to stubtest

* Add general darwin stubtest exception file

* Adding exceptions and platform ifs
2021-05-09 23:24:00 +03:00
hatal175
653191e514 A few linux stubtest fixes (#5381) 2021-05-08 12:49:42 -07:00
Shantanu
9cdd5220c2 Update allowlists (#5376)
Co-authored-by: hauntsaninja <>
2021-05-08 12:48:12 -07:00
hatal175
2dc02ae8a9 Fix stubtest issues (#5360)
* Fix some stubtest issues

* Remove MADV_SOFT_OFFLINE
2021-05-07 19:10:03 +03:00
Shantanu
4bf4d6adb6 Bump pyright (#5357)
For #5348

Co-authored-by: hauntsaninja <>
2021-05-06 15:26:24 -07:00
Akuli
e66b7fa660 delete _importlib_modulespec (#5350)
* delete _importlib_modulespec

* use typing_extensions.runtime_checkable
2021-05-06 17:13:35 +03:00
Sebastian Rittau
d16017ba0d Drop mypy self test (#5344)
Closes: #5303
2021-05-06 06:55:49 -07:00
Jake Bailey
a334a29c96 Bump pyright, disable PR/commit commenting for all but one job (#5347)
* Bump pyright, disable PR/commit commenting for now

* Show comments for 3.9

* And only on Linux
2021-05-05 22:49:21 +03:00
hatal175
461791db27 Fixing stubtest issues (#5339)
* Fix stubtest issues
2021-05-05 17:23:43 +03:00
Akuli
9f732a128a enable mypy_test for python 3.10 (#5341)
* enable mypy_test for python 3.10

* avoid collections.Mapping and collections.MutableMapping, import from typing
2021-05-05 00:09:33 +03:00
Akuli
54699d6cca change positional-only test to use Python 3.10 (#5340) 2021-05-04 13:35:05 -07:00
Akuli
59390469d6 Run stubtest on python 3.10 (attempt 2) (#5313) 2021-05-04 11:56:51 -07:00
Akuli
7dffcb5c6a Revert "run stubtest on python 3.10 (#5305)" (#5311)
This reverts commit 7590506039.
2021-05-02 12:55:26 -07:00
Akuli
7590506039 run stubtest on python 3.10 (#5305) 2021-05-02 17:46:17 +02:00
Jake Bailey
413276f411 Use pyright-action to run pyright, bump pyright (#5274)
I recently published https://github.com/marketplace/actions/run-pyright, which wraps pyright and uses GHA magic to leave diagnostics on commits / PRs (like https://github.com/jakebailey/pyright-action-test/pull/1/files), plus a faster startup time thanks to GHA tool caching and piggy backing off of the `node` install used in GHA itself (so no `setup-node` needed).

This PR switches to that action and leaves a comment noting that the version number is pinned in two places.

This action is a prototype, but I'm pretty confident in it so far.
2021-04-30 18:06:58 -07:00
Sebastian Rittau
48b060cfa0 mypy self check: Use mypy version from requirements file (#5245) 2021-04-26 12:51:28 +02:00
hatal175
d151d1b8bb Stubtest fixes (#5249) 2021-04-25 21:56:54 -07:00
hatal175
bf5ff49b53 mailbox, mimetypes, unittest, zipfile: stubtest fixes (#5239) 2021-04-21 21:58:01 -07:00
Shantanu
fc660d6d41 Move typing_extensions to stdlib (#5233)
I'm not sure what the best way to do this is. This effectively orphans
types-typing-extensions, but maybe that's not really a problem. (We can
yank the package too)

See https://github.com/python/typeshed/pull/5229#issuecomment-822234125
for some details

Co-authored-by: hauntsaninja <>
2021-04-20 21:55:48 -07:00
hatal175
fbf21995e3 Various stubtest fixes (#5230) 2021-04-18 09:30:00 -07:00
hatal175
c9d996fe55 Various stubtest exceptions (#5227) 2021-04-17 07:03:28 -07:00
hatal175
d3b2cafa85 builtins stubtest exceptions (#5219) 2021-04-16 10:41:04 -07:00
hatal175
82be016aa4 Various packages stubtest fixes (#5221) 2021-04-15 21:04:40 -07:00
hatal175
bf201c8201 Various stubtest fixes (#5215) 2021-04-14 19:14:07 -07:00
hatal175
f89cff3bf8 Fixing product and combinations (#5213) 2021-04-13 08:45:19 +02:00
hatal175
2ae49e1307 http/html stubtest fixes (#5208) 2021-04-12 13:37:09 +02:00
hatal175
7adb0213f7 Convert itertools functions to classes (#5211) 2021-04-12 12:28:51 +02:00
hatal175
472485d80a email stubtest exceptions (#5207) 2021-04-11 07:25:48 -07:00
hatal175
b308c1f964 bz2 stub exceptions (#5199) 2021-04-10 19:53:05 -07:00
hatal175
25bac1d716 csv, ctypes, configparser explanations (#5204) 2021-04-10 19:18:22 -07:00
hatal175
e26971a082 ssl stubtest exception fix/explanation (#5137) 2021-04-10 17:00:35 +02:00
hatal175
5fef564636 Protobuf text_format stubs (#5167)
Fixes #1781
2021-04-08 18:02:38 -07:00
hatal175
413614aa83 xml stubtest exceptions (#5161)
* Explaining xml stubtest exceptions

* Fix 3.6/3.7 ExternalEntityParserCreate

* Fix typos and formatting

* Missing return type

* Reverting ExternalEntityParserCreate change to see error

* Remove unused sys import

* Readd ExternalEntityParserCreate with explanations
2021-04-08 17:43:51 -07:00
hatal175
fd2a176094 Allow per distribution mypy strictness options (#5169)
As requested by https://github.com/python/typeshed/issues/1526.

This addition takes mypy configuration from each distribution metadata file and constructs a single mypy.ini to run with. It assumes there is no mypy.ini but in case we ever need one, it would be simple to add these on top of an existing configuration file.
Might be relevant for #2852

As the issue did not really specify how the configuration would look, I added the following:
- You may add a mypy-tests section to the metadata file.
It looks like this:
[mypy-tests]
[mypy-tests.yaml]
module_name = "yaml"
[mypy-tests.yaml.values]
disallow_incomplete_defs = true
disallow_untyped_defs = true

- module_name can be of the form "a.*" like in mypy.ini.
- You can add several module sections for complex distributions with several modules.
- I added the '--warn-incomplete-stub' option since it is made specifically for typeshed runs. See docs.
2021-04-07 21:30:08 -07:00
hatal175
2e703c37e9 Fix importlib stubtest exceptions (#5148)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2021-04-05 12:01:26 -07:00