Commit Graph

1106 Commits

Author SHA1 Message Date
Jun Komoda
ae0c9f9dad Move _SimpleCData and Array from ctypes/__init__.pyi to _ctypes.pyi (#10118) 2023-04-30 21:22:46 +01:00
Alex Waygood
2c3449694b Run mypy and pyright on our py312 stubs in CI (#10119) 2023-04-30 15:31:08 +01:00
Tomas R
a7748a9dd1 Add missing stubs for logging.config (#10055)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-04-27 07:57:46 -07:00
Avasam
6cb8bc0ac4 Mark SQLAlchemy stubs with ignore_missing_stub = false (#9653)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-04-26 17:49:46 -07:00
Nikita Sobolev
1d9f35369d functools: Add cache_parameters method to _lru_cache_wrapper (#10076)
The docs says that `cache_parameters()` function was added in 3.9: https://docs.python.org/3/library/functools.html#functools.lru_cache
Source: af53046995/Lib/functools.py (L512)
But, `typeshed` does not have it.
2023-04-24 07:29:54 -07:00
Nikita Sobolev
2bfb6d8212 Fix CI, use new termcolor version (#10079) 2023-04-24 07:17:23 -07:00
Nikita Sobolev
8af0a1f9e8 Fix typo (#10078) 2023-04-24 04:43:18 -07:00
Tomas R
cc674b5dce Add a stub for sys.thread_info (#10016) 2023-04-07 11:31:57 +03:00
Avasam
2e59b81ffd Use of twisted in pika (#9494)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-03-24 22:51:59 -06:00
Alex Waygood
ca55889329 distutils/setuptools: Don't use wildcards for allowlist entries (#9900) 2023-03-17 14:05:12 -07:00
Henry Schreiner
2d990ee2f7 Fill out more annotations for distutils & setuptools dist (#9895)
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-03-17 18:48:24 +00:00
Henry Schreiner
3a82796d1e [distutils] Add generated methods to Distribution (#9896) 2023-03-17 12:14:36 +01:00
Mehdi Drissi
1d15121f1d Tensorflow protobuf stubs (#9873)
Co-authored-by: Mehdi Drissi <mdrissi@snapchat.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-03-15 00:51:16 -07:00
Anton Grübel
53e1b534c7 add signal.SIGSTKFLT on py311+ (#9870) 2023-03-12 14:18:23 +00:00
Avasam
a5fc97e6da Fix misnamed parameter in stubtest_third_party (#9716) 2023-03-09 07:33:45 +00:00
Alex Waygood
8a2bc88409 Improve typechecking of the test suite (#9806) 2023-03-08 08:35:41 +00:00
Avasam
14b06ae672 pytype_test.py: Fix typechecking errors following #9747 (#9849) 2023-03-06 18:23:07 +00:00
Alex Waygood
257e287fec Stdlib: correct many parameter names (#9815) 2023-03-04 09:53:12 +00:00
Alex Waygood
2daa07ddf0 stubtest_stdlib: suppress output from pip (#9807) 2023-02-25 16:32:24 -08:00
Alex Waygood
1d2ae2598b Fix some typos in comments (#9802) 2023-02-23 22:11:24 +00:00
Avasam
75f47d0cb1 Typecheck typeshed's code with pyright (#9793)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-02-22 18:53:07 +00:00
Alex Waygood
fea57ad095 hmac.HMAC: digestmod defaults to None on py37 (#9790) 2023-02-21 18:24:34 +00:00
Avasam
5ac80781ec Integrate requirements-stubtest.txt into METADATA.toml (#9778) 2023-02-21 11:19:50 +01:00
Avasam
a6c6bc1b8e Fix stdlib/disutils testing (#9734) 2023-02-21 08:06:20 +00:00
Alex Waygood
880c0da404 Enable some more mypy lints when checking our own code (#9787) 2023-02-21 00:54:35 +00:00
Alex Waygood
bc847a9b07 Use generic NamedTuples to clean up urllib.parse (#9773) 2023-02-20 16:41:49 -08:00
Alex Waygood
4d99b33f84 Fix an unnecessary allowlist entry in ssl.pyi (#9776) 2023-02-20 16:35:38 -08:00
Avasam
ed6748fb32 Stubtest settings: change ignore_missing_stub default to false (#9779)
If you're reading about this commit from an autogenerated changelog entry, this should have no user-visible impact on how the stubs are interpreted by a type checker; it's just an internal change to how typeshed's tests work.
2023-02-20 22:37:45 +00:00
Alex Waygood
3786ab295e Fix an unnecessary socketserver allowlist entry (#9777) 2023-02-20 11:14:20 -08:00
Thomas M Kehrenberg
40d853cbe2 Add __set__ to functools.cached_property (#9762) 2023-02-20 12:36:45 +00:00
Alex Waygood
c5b5dd4bf4 Various stdlib dunders: correct parameter names; improve types; add defaults (#9761)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-02-19 22:44:20 +00:00
Avasam
74112dc189 Add a run_stubtest flag to scripts/runtests.py (#9717)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-02-19 22:10:32 +00:00
Shantanu
5c54e52e23 Fix default value of input, remove now unused allowlist entry for epoll (#9742) 2023-02-17 01:55:31 +02:00
Avasam
140bba3425 Add comments when subclassing Any (#9732) 2023-02-14 14:11:56 +01:00
Alex Waygood
60789273a2 Improve pyright verification of third-party test cases in CI (#9650)
Co-authored-by: Avasam <samuel.06@hotmail.com>
2023-02-07 11:53:54 +00:00
Alex Waygood
0ef9c3f8e8 Enable flake8-pyi's Y037 (#9686) 2023-02-06 19:01:02 -08:00
Alex Waygood
efee70abfa Bump mypy to 1.0 (#9684) 2023-02-06 15:57:17 -08:00
Alex Waygood
2539649560 Add a default for ssl.SSLContext.__new__ on 3.10+ (#9635) 2023-01-31 17:30:00 -08:00
Alex Waygood
9e71de0421 Improve several stdlib setdefault methods (#9612) 2023-01-31 15:39:24 -08:00
Alex Waygood
8a098a8601 Various asyncio classes: remove the loop argument on 3.10 (#9630) 2023-01-30 16:55:08 -08:00
Alex Waygood
94065d3aa5 Fix typo in tests/regr_test.py (#9628)
It looks like in #9382, I reintroduced the bug that I previously fixed in #9349
2023-01-30 22:56:44 +00:00
Alex Waygood
6011cac0cc Stdlib: fix three trivial issues with parameter defaults (#9618) 2023-01-29 21:40:56 -08:00
Alex Waygood
dd3aedd133 Correct str.maketrans and collections.UserString.maketrans (#9611) 2023-01-29 11:45:08 -08:00
Alex Waygood
25e02db42c Fix typo in parse_metadata.read_stubtest_settings (#9605)
Fixes #9603
2023-01-29 00:40:42 +00:00
Alex Waygood
c216b74e39 Centralize METADATA.toml parsing in the test suite (#9534) 2023-01-28 15:13:46 +00:00
Alex Waygood
a4e3cfefac Improve pre-commit config (#9563)
- Add a few more hooks. These are all very fast, and I've found them useful in other projects:
  - Autofixes:
    - `trailing-whitespace`: fixes trailing whitespace
    - `requirements-txt-fixer`: alphabetises items in `requirements.txt` files
    - `end-of-file-fixer`: makes sure every file ends with a single newline character
    - `mixed-line-ending`: Makes sure Windows users don't accidentally introduce CRLF line endings into a file that uses LF line endings
  - None-autofixes:
    - `check-yaml`: loads YAML files to validate syntax
    - `check-toml`: loads TOML files to validate syntax
    - `check-merge-conflict`: detects merge-conflict strings in files and blocks them from accidentally being committed
    - `check-case-conflict`: checks for files with names that would conflict on a case-insensitive filesystem like MacOS HFS+ or Windows FAT; blocks them from being committed.
  - Change the bot schedule to quarterly, to reduce noisy PRs
  - Change the `black` language target-version to Python 3.10, synching the setting here with the changes that were made to our `pyproject.toml` file in #7538
2023-01-18 06:29:18 -08:00
Jelle Zijlstra
aa4d6d87ae asyncio: fix default for subprocess_exec (#9561) 2023-01-18 15:03:22 +01:00
Avasam
c70d303985 Audit stdlib object annotations (#9519) 2023-01-17 15:40:00 +00:00
Alex Waygood
3d6b8dccfe mypy_test.py: Try using a process pool instead of a thread pool (#9556) 2023-01-17 14:17:45 +00:00
Alex Waygood
597e1a0078 Bump various test dependencies (#9549) 2023-01-16 11:04:45 -08:00