Alex Waygood
b417d5796d
Run flake8-noqa in CI ( #8641 )
2022-08-29 21:06:47 +01:00
junkmd
1c6eb33c23
add and migrate constants from ctypes/__init__.pyi to _ctypes.pyi ( #8643 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
Co-authored-by: Akuli <akuviljanen17@gmail.com >
2022-08-29 15:33:47 +01:00
Alex Waygood
c72c9a6c96
typed_ast.ast3: arguments.kw_defaults should be list[expr | None] (#8645 )
...
```python
>>> from typed_ast import ast3
>>> print(ast3.dump(ast3.parse('def foo(*, arg: int) -> None: ...')))
Module(body=[FunctionDef(name='foo', args=arguments(args=[], vararg=None, kwonlyargs=[arg(arg='arg', annotation=Name(id='int', ctx=Load()), type_comment=None)], kw_defaults=[None], kwarg=None, defaults=[]), body=[Expr(value=Ellipsis())], decorator_list=[], returns=NameConstant(value=None), type_comment=None)], type_ignores=[])
```
This bug was discovered in https://github.com/python/mypy/pull/13547
2022-08-29 14:44:48 +01:00
Alex Waygood
c0f27e39f9
Upgrade pytype to 22.8.23 ( #8644 )
2022-08-29 14:07:11 +01:00
Alex Waygood
bc26a98bd7
create_baseline_stubs.py: Modernize a few type annotations (#8642 )
2022-08-29 13:49:00 +01:00
Kevin Kirsche
2c7ac0990f
Remove ssl.SSLContext.__init__ ( #8640 )
...
Fixes : #8632
2022-08-29 13:07:59 +01:00
Alex Waygood
e2211cb420
Delete some unused # noqa comments ( #8639 )
2022-08-29 12:56:06 +01:00
Alex Waygood
c8a679657b
Delete scripts/update-stubtest-allowlist.py ( #8606 )
2022-08-29 13:50:26 +02:00
Nikita Sobolev
d3cded7fc6
redis: Add _Encodable type alias ( #8638 )
2022-08-29 13:38:22 +02:00
Nikita Sobolev
6e985ef3de
stdlib mapping classes: Use better names for various pos-only parameters ( #8637 )
2022-08-28 23:29:00 +01:00
Alex Waygood
1b6cda86d4
Alphabetise items in requirements-tests.txt ( #8635 )
2022-08-28 07:59:17 -07:00
Nikita Sobolev
6d5fd0e290
Allow passing tuples to ipaddress.ip_network ( #8634 )
2022-08-27 18:38:26 +01:00
Nikita Sobolev
481027e194
redis: Improve ClusterPubSub types ( #8627 )
2022-08-27 16:13:46 +01:00
Jason Heiss
d1d9b98aff
imaplib.Time2Internaldate also takes datetimes and 9-element tuples (#8630 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2022-08-27 16:11:26 +01:00
MapleCCC
dece0b1fff
assertRaises / assertRaisesRegex / assertWarns / assertWarnsRegex: msg argument is keyword-only (#8631 )
2022-08-27 15:55:14 +01:00
GrozniyToaster
b6b8894964
Accept anything with __getitem__ in str.translate ( #8629 )
...
translate table protocol
2022-08-26 20:24:21 +03:00
Nikita Sobolev
0259068ad6
Remove duplicate definitions in sub-classes ( #8594 )
2022-08-26 17:10:55 +02:00
Alex Waygood
d91e5f0eff
Further enhance check_consistent.py ( #8604 )
2022-08-26 07:50:26 -07:00
Alex Waygood
8cf125d80d
flake8 config: fix typo ( #8626 )
...
Accidentally introduced in #8612
2022-08-26 11:55:47 +01:00
Shantanu
93ee41bcd9
typing: add _type_repr ( #8624 )
2022-08-26 12:15:11 +02:00
github-actions[bot]
6114fb54c0
[stubsabot] Bump tree-sitter-languages to 1.4.* ( #8623 )
2022-08-26 10:23:59 +01:00
Nipunn Koorapati
7beaebff40
Bump to mypy-protobuf 3.3.0 ( #8612 )
...
* Bump to mypy-protobuf 3.3.0
* Remove some ignores for formatting
2022-08-26 07:24:11 +01:00
Arnav Singh
712b265a16
Fix os.{,p}{read,write}v to take Sequence of ReadableBuffer / WriteableBuffer ( #8617 )
...
Fixes #8615
Fixes #8616
2022-08-25 21:50:01 -07:00
github-actions[bot]
ef25fc6c9b
[stubsabot] Bump jsonschema to 4.14.* ( #8619 )
2022-08-25 19:36:01 -07:00
github-actions[bot]
e93af9b333
[stubsabot] Bump setuptools to 65.3.* ( #8620 )
2022-08-25 19:34:32 -07:00
github-actions[bot]
d6eb817b31
[stubsabot] Bump flake8-bugbear to 22.8.23 ( #8622 )
2022-08-25 19:33:22 -07:00
Shantanu
c91dfdeb2b
Fix stubsabot action ( #8618 )
...
Broken by #8605 and the issue creation code was always broken
2022-08-25 17:28:59 -07:00
junkmd
179228370a
Add win32-specific constants to _ctypes ( #8614 )
2022-08-25 16:22:06 +01:00
Stephen Rosen
2c534dc220
Improve annotation of jsonschema.validators.create ( #8608 )
2022-08-25 15:25:15 +02:00
Nipunn Koorapati
c17c0d5607
Bump protobuf to 3.20.1 ( #8609 )
...
There are even newer versions available (4.*), but I had found a bug
in it which prevented it from working with mypy-protobuf. For now,
sticking to just 3.20.1
2022-08-25 13:28:08 +01:00
Alex Waygood
1c56148ce9
mypy_test.py: Remove --dry-run option (#8611 )
...
Cf #8139 .
2022-08-25 14:23:00 +02:00
Nipunn Koorapati
c697a51378
Support tests/mypy_test.py [package] ( #8610 )
...
Currently, the testsuite early exits if it's filtering on a single
package. With this change, it will correctly complete.
For example `tests/mypy_test.py protobuf`
2022-08-25 12:25:26 +01:00
Alex Waygood
0f1d1f16b4
isort: don't skip stdlib/venv ( #8607 )
2022-08-24 15:48:27 -07:00
Alex Waygood
15f74295d2
Add aiohttp and tomlkit to requirements-tests.txt ( #8605 )
2022-08-24 23:08:54 +01:00
Liam Damewood
3ab3711f42
tqdm: All leave arguments can be None ( #8603 )
...
All `leave` arguments are optional in tqdm.
2022-08-24 12:30:29 +02:00
Shantanu
49062f53c3
Improve check_consistent ( #8581 )
...
- Use pathlib for convenience
- Share more logic between check_stubs and check_stdlib
- Better recursive checking, e.g. if a README.md is in the wrong place
- Fixes bug in checking directories in stubs/
- Test distribution names are valid
- Errors now contain full paths
- I believe pathlib normalises separators, but someone with Windows
might want to double check this continues to work
2022-08-23 23:18:07 -07:00
Aron Bierbaum
ef6bacab92
Update ForwardRef._evaluate for Python 3.11 ( #8600 )
...
recursive_guard argument was added in https://github.com/python/cpython/pull/21553
2022-08-23 18:05:55 -07:00
Nikita Sobolev
fed419b8f1
Add CTYPES_MAX_ARGCOUNT to _ctypes ( #8601 )
2022-08-23 14:52:16 -07:00
junkmd
2066b9533c
_ctypes: add stubs ( #8582 )
...
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com >
Co-authored-by: hauntsaninja <hauntsaninja@gmail.com >
2022-08-23 12:22:12 -07:00
Alex Waygood
1e33759f09
cryptography: Add some missing @abstractmethod decorators (#8598 )
2022-08-23 11:38:08 -07:00
Alex Waygood
e160324ba7
six: Fix incorrect type[type[Any]] annotation (#8599 )
...
Mypy will (correctly, I think) start flagging `type[type[Any]]` as an illegal annotation when mypy 0.980 comes out. Let's fix it now, before it comes out.
2022-08-23 11:26:10 -07:00
Ganden Schaffner
9469c1c7ea
Make AsyncExitStack.push_async_exit support __aexit__s returning Awaitable[None] ( #8596 )
...
Make push_async_exit support __aexit__'s returning Awaitable[None]
2022-08-23 14:28:37 +01:00
Alex Waygood
875f0ca7fc
mypy_test.py: Move type-checking of our tests and scripts into a different test (#8587 )
2022-08-22 17:16:03 +01:00
Akuli
5ea1b1e6de
Add types to tkinter.colorchooser.askcolor ( #8588 )
2022-08-22 18:15:37 +02:00
Alex Waygood
976fdae300
xml stubs: Any -> Incomplete (#8576 )
2022-08-22 16:42:37 +01:00
Kevin Kirsche
269c07589a
Add more annotations to xml.dom.minidom and xml.sax.handler ( #8590 )
2022-08-22 16:20:34 +01:00
Nikita Sobolev
57495ddaf4
Update redis/cluster.pyi ( #8593 )
2022-08-22 16:09:01 +02:00
Nikita Sobolev
383eca299b
redis: Do not override AbstractRedis.RESPONSE_CALLBACKS (#8592 )
2022-08-22 14:51:51 +01:00
kasium
cb15481633
Flask-SQLAlchemy: session should be scoped_session, not Session (#8589 )
2022-08-22 13:30:33 +01:00
Alex Waygood
c2966bc5ed
multiprocessing.reduction: Any -> Incomplete (#8585 )
2022-08-21 17:43:55 -07:00