Alex Waygood
307aadc632
Improve the signature of types.MappingProxyType.__eq__ ( #9581 )
2023-01-23 14:41:27 +01:00
Jukka Lehtosalo
d5b88c552c
Add __eq__ to types.MappingProxyType ( #9580 )
...
The type has a custom __eq__:
https://github.com/python/cpython/blob/v3.11.1/Objects/descrobject.c#L1906
This helps fix this mypy false positive when using `--strict-equality`:
```
from types import MappingProxyType
p = MappingProxyType({'x': 1})
d = {'x': 1}
print(p == d) # error: Non-overlapping equality check
```
The fragment prints `True` so the comparison is valid.
2023-01-23 09:55:25 +00:00
Seth Michael Larson
ebba92c986
Add SSLContext.security_level property for Python 3.10 ( #9577 )
2023-01-22 19:28:44 +01:00
gandalf3
b11e2e37c6
create_datagram_endpoint expects a str when family=AF_UNIX ( #9574 )
...
Since python 3.7, asyncio.loop.create_datagram_endpoint expects the
arguments `local_addr` and `remote_addr` to be `str` or `None` when the
argument family=`socket.AF_UNIX` and the argument `sock` is `None` or
also a unix socket.
2023-01-21 22:00:44 +01:00
github-actions[bot]
a8e4b3a018
[stubsabot] Bump flake8-bugbear to 23.1.20 ( #9576 )
...
Release: https://pypi.org/pypi/flake8-bugbear/23.1.20
Homepage: https://github.com/PyCQA/flake8-bugbear
Changelog: https://github.com/PyCQA/flake8-bugbear#change-log
Diff: https://github.com/PyCQA/flake8-bugbear/compare/23.1.17...23.1.20
2023-01-21 00:22:24 +00:00
Alex Waygood
d98d1674e7
Fix a few issues with parameter defaults ( #9572 )
2023-01-20 09:47:59 -08:00
github-actions[bot]
7e40d70cad
Bump flake8-bugbear to 23.1.17 ( #9569 )
...
Release: https://pypi.org/pypi/flake8-bugbear/23.1.17
Homepage: https://github.com/PyCQA/flake8-bugbear
Changelog: https://github.com/PyCQA/flake8-bugbear#change-log
Diff: https://github.com/PyCQA/flake8-bugbear/compare/23.1.14...23.1.17
2023-01-19 00:22:51 +00:00
Jelle Zijlstra
af2ce282d5
builtins: do the TODO on compile() ( #9567 )
2023-01-18 11:48:48 -08:00
Avasam
6ac24ed923
Replace Any with Incomplete in many places ( #9565 )
2023-01-18 19:12: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
Sebastian Rittau
eb4d17031f
[fpdf2] Restore string default values ( #9562 )
...
Cf. #9546
2023-01-18 11:29:32 +00:00
Alex Waygood
4fea314594
Replace Any with Incomplete in many places ( #9558 )
2023-01-18 08:48:16 +00:00
Jelle Zijlstra
ddfaca3200
stdlib: add argument default values ( #9501 )
2023-01-18 09:37:34 +01:00
Avasam
6cb934291f
Complete jack-client stub ( #9530 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2023-01-17 20:31:49 -08:00
Alex Waygood
242ef6f2bd
Bump pytype to 2023.1.17 ( #9559 )
2023-01-18 01:35:11 +01:00
Avasam
a991234832
types-Pillow: Allow stubtest to validate PIL.FpxImagePlugin and PIL.MicImagePlugin (#9531 )
2023-01-17 16:37:17 +00:00
Avasam
5b0488928d
Complete and validate redis.ocsp (use requests, cryptography and pyopenssl) ( #9528 )
2023-01-17 15:47:26 +00: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
Sebastian Rittau
7b848b4ede
Update fpdf2 stubs to 2.6.1 ( #9546 )
2023-01-17 13:25:41 +01:00
Alex Waygood
2b9f200e7e
Reenable flake8-pyi's Y011 and Y015 ( #9551 )
2023-01-16 22:52:40 +00:00
Alex Waygood
597e1a0078
Bump various test dependencies ( #9549 )
2023-01-16 11:04:45 -08:00
Kalle Møller
6b23df3db6
Update _FilterType to retuning bool ( #9514 )
2023-01-16 16:12:40 +01:00
Alex Waygood
c8c5953aa0
Xlib: Import Pattern from re, not typing (#9544 )
...
Refs https://github.com/PyCQA/flake8-pyi/pull/324
2023-01-16 10:09:06 +00:00
Mehdi Drissi
ebde125d70
Update tensorflow to 2.11 ( #9543 )
...
Co-authored-by: Mehdi Drissi <mdrissi@snapchat.com >
2023-01-15 10:28:29 +00:00
github-actions[bot]
eee0ad644d
[stubsabot] Bump pytz to 2022.7.1 ( #9540 )
...
Release: https://pypi.org/pypi/pytz/2022.7.1
Homepage: http://pythonhosted.org/pytz
2023-01-15 00:51:35 +00:00
github-actions[bot]
7a12cbd8f0
[stubsabot] Bump flake8-bugbear to 23.1.14 ( #9541 )
...
Release: https://pypi.org/pypi/flake8-bugbear/23.1.14
Homepage: https://github.com/PyCQA/flake8-bugbear
Changelog: https://github.com/PyCQA/flake8-bugbear#change-log
Diff: https://github.com/PyCQA/flake8-bugbear/compare/22.12.6...23.1.14
2023-01-15 00:50:26 +00:00
Mehdi Drissi
ea0ae2155e
Initial tensorflow stubs ( #8974 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2023-01-14 20:59:29 +00:00
Alex Waygood
0a291da2f0
Pin fpdf2 stubs to 2.6.0 ( #9535 )
...
They will need some updates to become compatible with `fpdf2` 2.6.1.
Closes #9524
2023-01-14 18:39:04 +00:00
Avasam
0e36622c72
Resolve stubtest allowlist entries for ldap3 ( #9532 )
2023-01-14 18:11:17 +00:00
Avasam
85792bca71
Fix stubtest for sqlalchemy.testing.plugin.pytestplugin ( #9533 )
2023-01-14 13:38:20 +00:00
Avasam
1a9aa3f3fe
Update various comments now non-types dependencies are allowed ( #9527 )
2023-01-14 13:20:04 +00:00
Avasam
cd56735bf0
Allow influxdb-client to be completely tested by stubtest ( #9529 )
2023-01-14 11:03:21 +00:00
Avasam
1946907451
Allowlist-only fixes for stubtest on Windows ( #9522 )
2023-01-13 12:45:38 +00:00
Avasam
b216053432
Fix setuptools stubtest on windows ( #9521 )
2023-01-13 08:16:39 +00:00
Avasam
f84dca699d
Fix passlib stubtest on windows ( #9523 )
2023-01-13 08:14:37 +00:00
Avasam
102a8fa38c
Fix some Any subclassing in tqdm ( #9505 )
2023-01-13 08:10:21 +00:00
Alex Waygood
9a76e5a669
Flask-Migrate: Add Flask as a dependency (#9517 )
2023-01-13 00:24:13 +00:00
Alex Waygood
8736b7a565
Flask-Cors: Add Flask as a dependency (#9516 )
2023-01-13 00:13:58 +00:00
James Hilton-Balfe
62170653ce
Add itertools.batched ( #9515 )
2023-01-12 22:07:26 +00:00
Alex Waygood
00d663e109
third_party_stubtest: use MYPYPATH for internal dependencies ( #9512 )
2023-01-12 13:13:42 -08:00
Jelle Zijlstra
b43e1db47b
ssl, sysconfig: fix issues with defaults ( #9507 )
...
- ssl._create_unverified_context allows None since 3.10:
2875c603b2 (diff-f6439be9c66350dde4c35dbeea0352c96cc970ba12b0478f6ae36f10725bd8c5)
- sysconfig.is_python_build ignores its argument since 3.11:
067597522a
(was backported into 3.11)
2023-01-12 10:19:41 -08:00
Avasam
aad1a14890
Use the FileDescriptorOrPath alias consistently in the stdlib ( #9513 )
2023-01-12 18:14:48 +00:00
Jelle Zijlstra
f64807a468
socketserver: improve bytes handling ( #9096 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2023-01-12 16:46:20 +00:00
Avasam
63c7fb0914
Use environment marker to restrict flake8 install ( #9510 )
2023-01-12 09:57:18 +00:00
Alex Waygood
0b903441e8
Allow stubs to depend on numpy ( #9499 )
2023-01-12 09:01:23 +00:00
Jelle Zijlstra
b9eab637cb
subprocess: Improve bytes-related types ( #9100 )
2023-01-11 20:10:26 -08:00
Jelle Zijlstra
6a366c99a9
venv: add logger ( #9508 )
...
Not particularly useful but unreleased stubtest will require this:
https://github.com/python/typeshed/actions/runs/3898630022/jobs/6657546205
2023-01-11 19:33:16 -08:00
Jelle Zijlstra
1ce1c1ad17
subprocess: universal_newlines may be None ( #9509 )
...
All the way back to 3.7:
https://github.com/python/cpython/blob/3.7/Lib/subprocess.py#L684
It's treated like False
2023-01-11 19:15:40 -08:00