Commit Graph

134 Commits

Author SHA1 Message Date
Eric Traut
90695fadd1 Updated pyright to latest version (#7132) 2022-02-04 21:09:00 -08:00
Akuli
61495d80aa Automatically create an issue if the nightly stubtest run fails (#6978)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2022-01-20 18:24:14 +02:00
Sebastian Rittau
852723aa69 Temporarily pin Python 3.9.9 and 3.10.1 for stubtest (#6974) 2022-01-20 11:47:46 +01:00
Sebastian Rittau
28faad6143 Unpin 3.10.1 (#6965) 2022-01-19 06:44:31 -08:00
Akuli
b2375ddaeb Enable pyright for Python 3.11 (#6904) 2022-01-12 20:07:57 +01:00
Sebastian Rittau
e77a66aced Update pyright (#6840) 2022-01-07 18:58:15 +02:00
Akuli
4aa4cb9ae2 stubtest_third_party: do not install apt packages in the same script (#6714) 2021-12-28 11:33:49 +01:00
Sebastian Rittau
14e5d16c3a Replace METADATA stubtest key with stubtest_apt_packages (#6704) 2021-12-27 17:28:59 +01:00
Akuli
66ed211691 Re-enable stdlib stubtest on macos (#6696) 2021-12-26 19:59:04 +01:00
Sebastian Rittau
3fb2bcd4c1 Restore stubtest 0.930 (#6663) 2021-12-22 20:18:19 -08:00
Sebastian Rittau
ca87296daf Update to mypy 0.930 (#6660)
* Update to mypy 0.930

* Temporarily pin stubtest to 0.921
2021-12-22 12:10:45 -08:00
Shantanu
2ad00c9664 Use stubtest 0.920 (#6589)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
Co-authored-by: Akuli <akuviljanen17@gmail.com>
2021-12-17 13:58:11 +02:00
Sebastian Rittau
5f850af3ba Upgrade daily stubtest workflow to stubtest 0.920 (#6615) 2021-12-16 20:54:14 +01:00
Sebastian Rittau
3e49ed754d Allow tringgering some Actions by hand (#6613) 2021-12-16 11:51:34 -08:00
Sebastian Rittau
dae0b127ca Upgrade mypy to 0.920 (#6611)
Temporily pin mypy used for stubtest checks to 0.910, until the stubtest
problems are addressed.
2021-12-16 17:53:36 +01:00
Sebastian Rittau
c900c0e769 Fix Python 3.10.1 problems pointed out by stubtest (#6604)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
2021-12-16 07:05:45 -08:00
Akuli
714ba1747b stubtest: temporary pin to python 3.10.0 (#6602) 2021-12-16 12:47:47 +02:00
Sebastian Rittau
6860df029b Fix workflow by quoting Python version in YAML file (#6600) 2021-12-16 12:32:00 +02:00
Shantanu
9aa66f0c37 Run primer on latest Python version (#6593) 2021-12-16 08:56:30 +01:00
Akuli
f31b49699a fix mypy_primer_comment workflow for more shards (#6533) 2021-12-07 16:12:00 +01:00
Akuli
3da1db2698 shard mypy_primer more (#6530) 2021-12-07 15:03:59 +02:00
Sebastian Rittau
206e1ae91b Remove 'py3' from requirements filename (#6509) 2021-12-06 12:59:04 +02:00
Alex Waygood
1fa1270e00 Bump pyright version to 1.1.192 (#6478) 2021-12-03 09:08:35 +01:00
Akuli
ec0051a59b ci: fix stubtest_third_party while loop (#6468)
Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
2021-12-01 19:32:33 +02:00
Akuli
50d29ef424 ci: Do not run stubtest_third_party for deleted stubs (#6467) 2021-12-01 18:15:17 +01:00
Akuli
bdf906e2bc stubtest_stdlib: fail if there are unused allowlist entries (#6424)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-12-01 12:10:27 +02:00
Akuli
31c1865b91 Don't trigger mypy_primer from commits created by pre-commit.ci (#6385)
If pre-commit makes a change immediately after a PR has been made, it's important that the stubtest/mypy/pytype/pyright checks are run again, as line numbers might have changed. However, there's no reason to start a new run of mypy_primer, since pre-commit will make no substantive changes to a PR, only cosmetic changes, and that shouldn't affect the diff from mypy_primer.
2021-11-26 07:37:55 -08:00
Sebastian Rittau
b09e528f64 Remove black/isort checks from CI (#6376) 2021-11-25 21:08:20 +02:00
Sebastian Rittau
4c41f5d769 Only run daily stubtest on python/typeshed repository (#6354) 2021-11-22 07:35:35 -08:00
Jelle Zijlstra
1f1bc6f27c add pre-commit config (#6341)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Akuli <akuviljanen17@gmail.com>
2021-11-19 16:46:51 +02:00
Sebastian Rittau
ccc09aa196 Rework stubtest tests (#6318) 2021-11-17 21:54:13 -08:00
Jelle Zijlstra
9eabedca5f Make NoReturn a SpecialForm (#6290)
This is consistent with the runtime definition: https://github.com/python/cpython/blob/main/Lib/typing.py#L434.

The previous definition was wrong; NoReturn is not and should not be equivalent to None. This fixes an issue in pyanalyze where it was interpreting NoReturn as equivalent to None.
2021-11-12 17:34:44 -08:00
Sebastian Rittau
ce94db762c Update pytype and pyright (#6222)
* Upgrade pytype

* Update pyright
2021-11-02 09:19:07 -07:00
Akuli
75ca712f3c check_new_syntax.py: check nested annotations (#6167) 2021-10-14 00:28:38 +03:00
Akuli
e72a4034bf Cleanup: use lower-case list and dict, add a test (#6161) 2021-10-13 22:59:27 +03:00
Sebastian Rittau
ad7d478a8f Use release version of Python 3.10 (#6116) 2021-10-05 15:49:51 +03:00
Jake Bailey
2912ab0092 Update pyright to 1.1.175 (#6110) 2021-10-04 18:17:24 -07:00
Nikita Sobolev
392c81d767 Switch from toml to tomli (#6023) 2021-09-10 15:48:15 +02:00
Sebastian Rittau
9295c70ec0 'module' argument to ForwardRef.__init__() added in Python 3.9.7 (#6017)
Pin Python 3.9.7 for stubtest and update 3.10.0 to rc2
2021-09-10 01:10:28 +02:00
HunterAP23
ffaa0ea3d1 Added initial rework of the concurrent.futures module (#5646)
* Added initial rework of the concurrent.futures module

* Minor fixes

* Fixed some generics & changed to collections over typing for some types

* Switched thread to use queues instead of multiprocessing.queues

* More fixes

* More fixes following results from running tests locally

* Tmp commit of changes

* Minor flake8 fix

* Fixing some issues

* Fixed a weakref.ref issue

* Fixed one more weakref issue

* Fixed some issues with required version

* Fixed more python min version requirements

* More min version fixes

* Fixed misc error in workflow regarded outdated pip

* Replaced any usage of Optional and Union with proper form as described in the contributions guide

* Fixed issue with using Callable definition

* Fixed last seen issues as per review

* Fixed some basic issues & more proper import calls

* Update stdlib/concurrent/futures/process.pyi

Co-authored-by: Sebastian Rittau <srittau@rittau.biz>

* Update stdlib/concurrent/futures/process.pyi

Co-authored-by: Sebastian Rittau <srittau@rittau.biz>

* Minor fixes

* More minor fixes

* Fixed up some issues & cleaned up imports

* Removed usage of Union

* Changed wait method to use Set of Future to work with mypy-primer for Optuna repo

* Reverted change to wait method and DoneAndNotDoneFutures class

* Fixed DoneAndNotDoneFutures again

Co-authored-by: Akuli <akuviljanen17@gmail.com>
Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
2021-09-03 13:06:48 +02:00
Sebastian Rittau
bc19a28c0d CI: use one runner per mypy version (#5909)
This makes it easier to see in which version(s) an error occurred.
2021-08-29 04:00:10 -07:00
Shantanu
f6e4c9c38f Check for PEP 604 usage in CI (#5903)
Since this is a common review issue and our stubs have all been
converted

Co-authored-by: hauntsaninja <>
2021-08-28 11:37:50 -07:00
Shantanu
98846a65e2 More shards for stubtest_third_party (#5902)
Co-authored-by: hauntsaninja <>
2021-08-09 13:36:54 -07:00
Eric Traut
59624ff09c Updated pyright version to 1.1.160 (#5857)
* Updated pyright version to 1.1.160. Older versions contained a bug that prevented multiple third-party stub packages from having the same top-level module name.

* Disabled "reportUnsupportedDunderAll" diagnostic check for now.

Co-authored-by: Eric Traut <erictr@microsoft.com>
2021-08-06 09:21:57 +02:00
Sebastian Rittau
840df19501 Switch to Python 3.10.0-rc.1 in CI (#5845)
* Switch to Python 3.10.0-rc.1 in CI

* Add module argument to ForwardRef.__init__()
2021-08-04 07:14:38 -07:00
Sebastian Rittau
acc576659a Use Python 3.10 beta 4 instead of beta 1 in CI (#5839)
Quote all Python versions to make sure they are interpreted as strings,
not floats.
2021-08-02 07:30:32 -07:00
Sebastian Rittau
eb431196fa CI: use mypy version from requirements for primer (#5834) 2021-08-02 00:51:46 -07:00
Jake Bailey
96429cd4bd Update pyright to 1.1.152 (#5685) 2021-06-24 00:11:33 +02:00
Shantanu
7244ea1f71 Test third party stubs with stubtest (#5615) 2021-06-13 00:17:40 +02:00
Shantanu
e66ceceed0 Rename whitelist to allowlist (#5614)
Resolves #4436

I want to add stubtest for third party stubs, and figured it'd be easier
to make this change now.

Co-authored-by: hauntsaninja <>
2021-06-10 14:33:44 -07:00