Jelle Zijlstra
e0654bdbc0
ExceptionGroup: make it generic ( #7626 )
2022-04-15 16:24:17 +02:00
till
7f9be7fd00
Update linecache.pyi ( #7623 )
...
The `mtime` in linecache entries can be set to `None` for files loaded via a `__loader__` (cf: https://github.com/python/cpython/blob/3.10/Lib/linecache.py#L70 )
2022-04-14 17:25:25 +01:00
Alex Waygood
40985b4f02
Fix various __all__ bugs and omissions ( #7618 )
2022-04-14 08:03:19 -07:00
Akuli
f87e811345
Remove old comments about pinned Python versions ( #7622 )
2022-04-14 00:58:47 -07:00
Shantanu
e90a551ceb
Unpin Python micro versions ( #7621 )
...
Fixes #7620
2022-04-13 18:47:17 -07:00
Alex Waygood
a1b1b95f67
Unpin Python micro versions used by stubtest ( #7619 )
...
Add new `asyncio` method, fix allowlists
2022-04-13 22:07:01 +02:00
Jukka Lehtosalo
ce88976c0d
Add back six.moves.http_cookies.Morsel ( #7617 )
2022-04-13 16:52:29 +02:00
Jukka Lehtosalo
483550abe0
Drop some literal types from argparse (add_argument) ( #7614 )
...
These were introduced in #7329 and they cause false positives
in code that used to be accepted before.
2022-04-13 14:01:54 +02:00
Jukka Lehtosalo
f888995239
Add back six.moves.configparser.Error ( #7616 )
2022-04-13 14:01:03 +02:00
matt-slack
6573761324
Add stubs for Python-Jose ( #7613 )
2022-04-12 19:08:23 +02:00
Jukka Lehtosalo
75bcb07d06
Add missing definitions to six.moves.http_client ( #7615 )
...
These were removed as a side-effect of #7327 , which added
`__all__` to `http.client`. I checked that all the definitions
are present at runtime via `six.moves.http_client`.
2022-04-12 06:51:02 -07:00
Sebastian Rittau
636a7e8b37
Update bleach stubs to version 5 ( #7612 )
2022-04-11 17:48:55 -07:00
Akuli
40553277ad
asyncio: use WriteTransport in StreamWriter ( #7611 )
2022-04-09 07:03:34 -07:00
kasium
354787f6e0
Add stubs for stdlib-list ( #7608 )
2022-04-08 13:05:48 -07:00
Rebecca Chen
f1856a384e
pytype_test: Don't mix up stdlib and stub packages starting with stdlib. ( #7609 )
...
This should fix the pytype_test failure in
https://github.com/python/typeshed/pull/7608 .
2022-04-08 13:01:37 -07:00
Bao
79c654ef43
psycopg2: correct return type ( #7607 )
...
Fixes the return type of `psycopg2.cursor.fetchone()` to match the psycopg2 code:
1d3a89a0bb/psycopg/cursor_type.c (L647-L651)
1d3a89a0bb/psycopg/cursor_type.c (L748-L786)
It also matches the [psycopg2 documentation](https://www.psycopg.org/docs/cursor.html?highlight=copy_from#cursor.fetchone ) as well as the [DB-API](https://peps.python.org/pep-0249/#fetchone )
2022-04-07 15:36:26 -07:00
Will Frey
17b2f31b8c
Use ReadableBuffer instead of bytes in base64.pyi ( #7605 )
2022-04-07 19:47:04 +02:00
hasier
21171f1cb9
SQLAlchemy improvements for Operators ( #7604 )
2022-04-07 19:45:27 +02:00
hasier
754f421990
SQLAlchemy improvements for generative methods ( #7603 )
2022-04-07 13:06:46 +02:00
Sebastian Rittau
ef819f3910
Remove pre-Python 3.6 branches from datetime.pyi ( #7602 )
2022-04-07 11:33:45 +02:00
Alex Waygood
536f783a82
Exclude Y037 in .flake8 config, for now ( #7600 )
...
Unblocks https://github.com/PyCQA/flake8-pyi/pull/202
2022-04-06 17:24:02 +01:00
Hans Aarne Liblik
71d80efa43
Update pyVmomi stubs ( #7599 )
...
* Add generic base class `DynamicData`
* Add missing `key` prop to `OptionValue`
* Fix `MethodFault` not inheriting from `Exception`
* Fix `RetrieveOptions` default `maxObjects` type and default
2022-04-06 14:58:23 +02:00
Alex Waygood
3c85f36b7f
Reduce code duplication in the email module ( #7558 )
2022-04-06 12:20:14 +02:00
Alex Waygood
1ceb486b75
Replace Union with union operator ( #7596 )
2022-04-05 23:07:31 +02:00
Marko Zagožen
8ae678129e
Use Self return type for the 'replace()' methods in datetime classes ( #7595 )
2022-04-05 22:20:31 +02:00
Sebastian Rittau
3941e959ca
Update google-cloud-ndb stubs to 1.11 ( #7593 )
2022-04-05 06:58:02 -07:00
Alex Waygood
85aec034ae
Mark many attributes as read-only properties ( #7591 )
2022-04-05 08:37:24 +02:00
Alex Waygood
b8f2eb3930
Make several fields on _dummy_threading classes read-only properties ( #7588 )
2022-04-05 08:35:00 +02:00
Alex Waygood
414f324083
Add missing __match_args__ attributes to several unix-only structseq classes ( #7587 )
2022-04-04 21:33:49 +01:00
Alex Waygood
be64b01e6c
Upgrade black version ( #7582 )
2022-04-03 22:34:44 +01:00
Jelle Zijlstra
cfb1381c2e
Add types.FunctionType.__module__ ( #7581 )
...
This exists on builtins.function but not here.
2022-04-02 17:44:17 -07:00
Joe Young
d45c9084a4
Catch more potential type errors in builtins.sum ( #7578 )
...
Use a ` TypeVar` bound to a `Protocol` defining `__add__`
2022-04-01 23:19:05 +01:00
Alex Waygood
646993c211
Improve imp._FileLike.__exit__ ( #7577 )
...
The signature of this method currently doesn't work quite as intended: see https://github.com/PyCQA/flake8-pyi/pull/199#issuecomment-1086087342
Classes will [still be accepted](https://mypy-play.net/?mypy=latest&python=3.10&gist=77efe095d01edeb1a4614166f0c9cf68 ) as conforming to this protocol if they have more permissive signatures such as `def __exit__(self, *args: object) -> None: ...`
2022-04-01 18:01:23 +01:00
Alex Waygood
ec27c00ca2
Third-party stubs: Improve several __exit__ methods ( #7575 )
2022-04-01 08:03:12 -07:00
Sebastian Rittau
4c9dc43c87
Update SQLalchemy to 1.4.34 ( #7573 )
...
Closes : #7572
2022-04-01 14:22:00 +01:00
Alex Waygood
ae6ff79c0e
flake8 config: remove line that exists only for Python-2 checking ( #7570 )
2022-04-01 08:07:16 +02:00
Alex Waygood
da3e69d093
stdlib: Improve a bunch of __(a)exit__ methods ( #7571 )
2022-04-01 08:05:25 +02:00
Alex Waygood
85f060b26d
Exclude the Python-2 stdlib from flake8 CI check ( #7569 )
...
We should hopefully be getting rid of this entire subdirectory soon anyway (#7367 ). This will make PRs to flake8-pyi a lot easier.
2022-03-31 23:35:45 +01:00
Collin Anderson
e719f54432
_imp.create_dynamic returns ModuleType ( #7568 )
2022-03-31 22:38:43 +02:00
Steven Troxler
2d1d4b982f
logging/handlers.pyi: atTime is datetime.time ( #7566 )
...
It is marked as having type `datetime.datetime` but `atTime`
refers to a time of day; only the fields on `datetime.time`
are used. The [docs](https://docs.python.org/3/library/logging.handlers.html#timedrotatingfilehandler )
clearly state that it is a `time`.
2022-03-30 19:17:36 +01:00
luzpaz
6550a30fdc
Fix source comment typo ( #7567 )
...
Found downstream in mypy
2022-03-30 18:06:09 +01:00
Sebastian Rittau
9687d53b65
Use explicit type aliases in _typeshed ( #7534 )
2022-03-30 11:06:07 +02:00
Hans Aarne Liblik
e8fe316a74
Add a few classes to vmodl and vmodl.fault ( #7565 )
2022-03-29 22:07:25 +02:00
Alex Waygood
1245bbcc8d
Use type alias to simplify overloads in unittest.mock ( #7563 )
2022-03-29 08:19:26 +02:00
Henry Schreiner
da08cd30d0
locale: getlocale may return None's ( #7562 )
...
According to the docs at https://docs.python.org/3/library/locale.html#locale.getlocale , this function may return None for either of the two items in the return sequence, which is missed in the current form.
Also adjust `locale.setlocale()`, which can accept a tuple of `(None, None)` for the second argument.
2022-03-28 23:23:03 +01:00
Alex Waygood
a3245db63c
Remove unneeded # noqa comments, fix broken # noqa comments ( #7561 )
2022-03-28 23:17:44 +02:00
Alex Waygood
478e7527aa
mypy_test: Add two more config options (#7560 )
...
`--enable-error-code ignore-without-code` means that mypy will ignore any type: ignore comments that don't have mypy error codes. It doesn't appear to have any effect on type: ignore comments that mypy_test doesn't use (e.g. because they're pyright- or stubtest-specific).
`--strict-equality` means that mypy will raise errors if we do something silly like `if sys.version_info == "linux"`. flake8-pyi should also check this for us, but I don't see any reason not to have mypy check this as well.
2022-03-28 16:06:13 +01:00
Sebastian Rittau
c41034c354
passlib: Annotate various handler methods and fields ( #7521 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2022-03-26 20:53:05 -07:00
Kalle Møller
9aa64fdc22
requests: Update adapters.pyi ( #7544 )
...
The cert can be
* A string / bytes which is a path to a certfile
* A tuple with two string / bytes, where the first is the certfile and the second is a keyfile
* None (optional)
The tuple could be anything indexable, but there are strict requirement to actualle have two items, don't know if there is something more generic
See https://github.com/psf/requests/blob/main/requests/adapters.py#L242-L248
2022-03-26 20:41:25 -07:00
Alex Waygood
61b22db692
Add many missing __match_args__ attributes ( #7556 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com >
2022-03-26 19:36:28 +00:00