Akuli
52559e83cf
add comment about CodeType.replace to stubtest allowlists ( #6447 )
2021-11-29 09:01:00 -08:00
Alex Waygood
d5f9c95c26
Improve stub file for xml/dom/xmlbuilder.py ( #6171 )
...
Co-authored-by: Akuli <akuviljanen17@gmail.com >
2021-11-29 15:46:09 +02:00
Shantanu
287a9a427e
Fix allowlists ( #6440 )
...
Broken by https://github.com/python/typeshed/pull/6439
Co-authored-by: hauntsaninja <>
2021-11-28 20:18:49 -08:00
github-actions[bot]
e05a7423c4
Remove unused stubtest allowlist entries ( #6439 )
...
Co-authored-by: hauntsaninja <hauntsaninja@users.noreply.github.com >
2021-11-28 20:05:20 -08:00
Nikita Sobolev
d0ce310f55
Make ctypes.Array abstract ( #6361 )
...
Co-authored-by: Akuli <akuviljanen17@gmail.com >
2021-11-28 22:42:23 +02:00
Akuli
2b702233c6
tests/check_new_syntax.py: check order of if statements ( #6423 )
2021-11-28 08:04:46 -08:00
Shantanu
eb16dcc2c1
builtins: change aiter argument name ( #6412 )
2021-11-28 11:41:49 +02:00
Shantanu
c47ed98b3e
dummy_thread/ing: remove in 3.9 ( #6408 )
...
https://bugs.python.org/issue37312
2021-11-27 20:50:14 -08:00
Akuli
6130c2459e
Delete duplicate comment ( #6391 )
2021-11-26 12:56:27 -08:00
Alex Waygood
2dade8105a
Add missing methods to collections classes ( #6388 )
...
Co-authored-by: Akuli <akuviljanen17@gmail.com >
2021-11-26 21:53:16 +02:00
Alex Waygood
83e865b155
check_new_syntax.py: check for any import of deprecated contextlib aliases (#6371 )
2021-11-26 10:23:13 +02:00
Akuli
32a38e787f
Fix prints in stubtest_third_party ( #6380 )
2021-11-25 13:09:14 -08:00
Alex Waygood
a0f4740d54
Check for deprecated contextlib aliases in check_new_syntax.py ( #6366 )
2021-11-23 22:48:39 +02:00
Alex Waygood
a5f212ec00
Check for deprecated typing.Set in check_new_syntax.py ( #6365 )
2021-11-23 17:32:19 +02:00
Alex Waygood
2445eddb4b
Check for typing.Deque, typing.FrozenSet and typing.DefaultDict in check_new_syntax.py ( #6362 )
2021-11-23 12:35:23 +02: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
Jelle Zijlstra
0d7064c357
Make Mapping/MutableMapping params positional-only ( #5772 )
...
These are positional-only on dict, so it makes sense to mark them as positional-only in these base classes too.
Fixes #5771
2021-11-18 07:54:58 +01:00
Sebastian Rittau
77810277d5
Recommend to use mypy error codes if applicable ( #6305 )
2021-11-17 21:58:05 -08:00
Sebastian Rittau
bcc743dd2b
mypy_test: Skip files starting with '.' ( #6306 )
2021-11-16 17:00:39 +02:00
Sebastian Rittau
edf82e8094
Clean up mypy flags ( #6308 )
...
* Remove --strict-optional: This has been the default since mypy 0.600.
* Remove --disallow-subclassing-any: When we subclass Any in typeshed,
we do so deliberately. This just causes us to add unncessary ignores.
2021-11-16 12:58:53 +00:00
Alex Waygood
aa7e277adb
Harmonise return type of builtins.__import__ and importlib.import_module ( #6302 )
...
builtins.__import__ now returns ModuleType instead of Any. In addition, add __getattr__() to ModuleType to ease using imported modules.
2021-11-15 16:21:46 +01: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
5bd747570d
Update Python version for pytype ( #6288 )
2021-11-12 22:26:22 +01:00
Alex Waygood
4b3a8a8790
Improve support for running tests on Windows ( #6284 )
2021-11-12 17:09:20 +01:00
Shantanu
bf92378722
Bump typed-ast version, recommend Python 3.8 for tests ( #6278 )
2021-11-12 02:53:42 -08:00
Sebastian Rittau
e22b63d9cc
Reduce mypy_test output ( #6268 )
...
Only print the mypy command twice per version: Once for the stdlib and
once for the stubs. Use a dummy /tmp path. Add a header for each tested
Python version and remove the Python version from the individual stubs.
2021-11-09 18:03:29 +01:00
luzpaz
b95b729b9e
Fix typos ( #6263 )
...
Found via `codespell -q 3 -L alo,asend,ba,nams,spawnve`
2021-11-08 18:23:15 -08:00
Sebastian Rittau
3876587a65
Remove support for mypy_exclude_list ( #6230 )
2021-11-08 10:45:46 +02:00
Sebastian Rittau
50c1f2ab7c
Test third-party stubs in isolation ( #6229 )
2021-11-07 15:05:49 -08:00
Alex Waygood
d5d0ba158e
Make `__round__ positional-only for float, int, Decimal and SupportsRound` ( #6242 )
2021-11-07 15:05:18 -08:00
Sebastian Rittau
0958692028
Suppress unnecessary traceback ( #6253 )
2021-11-07 07:35:31 -08:00
github-actions[bot]
59dfea08c3
Remove unused stubtest allowlist entries ( #6227 )
2021-11-02 21:17:15 -07:00
Sebastian Rittau
ce94db762c
Update pytype and pyright ( #6222 )
...
* Upgrade pytype
* Update pyright
2021-11-02 09:19:07 -07:00
Shantanu
9f691d9c6e
stubtest_third_party: advice for unused allowlist entries ( #6208 )
...
Co-authored-by: hauntsaninja <>
2021-10-27 21:55:18 -07:00
Akuli
994b69ef8f
Use lowercase tuple where possible ( #6170 )
2021-10-14 17:18:19 -07:00
Akuli
b2082ce559
check_new_syntax.py: improve dicts in error message ( #6168 )
...
Improve error message for bad dict. Before dict[(int, str)] now dict[int, str]
2021-10-13 18:14:05 -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
github-actions[bot]
54ff11bf9f
Remove unused stubtest allowlist entries ( #6158 )
...
Co-authored-by: hauntsaninja <hauntsaninja@users.noreply.github.com >
2021-10-12 22:17:04 -07:00
Sebastian Rittau
bb24e77404
Update remaining versions for third-party stubs ( #6094 )
...
Also remove the python2 markers of packages that don't list Python 2
as supported in the latest version.
Don't special case version '0.1'
Co-authored-by: Akuli <akuviljanen17@gmail.com >
2021-10-12 12:30:45 +02:00
Sebastian Rittau
9f86972350
Add star to all non-0.1 versions ( #6146 )
2021-10-11 13:41:19 -07:00
Sebastian Rittau
46fc031ee7
Allow third-party versions to end in asterisk ( #6129 )
...
This is a first step towards #6095 , where x.y and x.y.* are treated as
equivalent. The next step is to update existing versions to use x.y.*
where applicable and then treat x.y differently.
Co-authored-by: Akuli <akuviljanen17@gmail.com >
2021-10-11 00:46:18 +02:00
github-actions[bot]
a3e4fcca26
Remove unused stubtest allowlist entries ( #6119 )
...
Co-authored-by: hauntsaninja <hauntsaninja@users.noreply.github.com >
2021-10-05 21:07:49 -07:00
Jake Bailey
2912ab0092
Update pyright to 1.1.175 ( #6110 )
2021-10-04 18:17:24 -07:00
Shantanu
67e8979ac1
stubtest_third_party: more newlines in printing ( #6060 )
...
Co-authored-by: hauntsaninja <>
2021-09-21 23:16:12 +02:00
Anton Grübel
caa642dd3b
improve typing in inspect ( #6020 )
2021-09-18 20:11:55 -07:00
Sebastian Rittau
0506182348
Allow three-component third-party versions ( #5995 )
...
Closes : #5992
2021-09-18 20:08:51 -07:00
Screwtapello
4c6e98ed0c
Add many missing tkinter type annotations ( #6002 )
...
Co-authored-by: Sebastian Rittau <srittau@rittau.biz >
Co-authored-by: Akuli <akuviljanen17@gmail.com >
2021-09-12 11:42:12 +03:00
Nikita Sobolev
392c81d767
Switch from toml to tomli ( #6023 )
2021-09-10 15:48:15 +02:00
Anton Grübel
1af6810b5d
Improve typing in zipfile ( #5991 )
...
* Improve typing in zipfile
* fix CR suggestions
2021-09-03 13:02:11 +02:00