Commit Graph

5657 Commits

Author SHA1 Message Date
Sebastian Rittau
5bf672ce42 Update redis stubs to 4.1.1 (#6960)
Closes: #6951
2022-01-19 07:05:15 -08:00
Sebastian Rittau
28faad6143 Unpin 3.10.1 (#6965) 2022-01-19 06:44:31 -08:00
Alex Waygood
2170693e11 Add various __*or__ methods, and improve dict.__ior__ (#6961) 2022-01-19 12:24:16 +01:00
Jelle Zijlstra
30580a3732 disable Y026 in typing.pyi too (#6959) 2022-01-18 20:14:55 -08:00
Jelle Zijlstra
65a8825e2f Disable Y026 from flake8-pyi (#6958)
Dependent on PyCQA/flake8-pyi#101.
2022-01-18 20:07:34 -08:00
Jelle Zijlstra
a0d748de2f Revert "Temporarily fix redis version to 4.1.0" (#6957)
This reverts commit 7d2de33bba.
2022-01-18 15:09:19 -08:00
Alex Waygood
90d92aa0a5 Use _typeshed.Self in protobuf/google/protobuf/message.pyi (#6955) 2022-01-18 12:54:09 -08:00
Alex Waygood
cd93461225 Use PEP 585 syntax in @python2/_ast, convert more TypeVars to _typeshed.Self, & # noqa a SQLAlchemy line (#6954)
* Manual fixes for `_ast` and `SQLAlchemy`

* Change more `TypeVar`s to `Self`, using script
2022-01-18 11:15:34 -08:00
Nikita Sobolev
989fe11806 Use Literal type and improve callbacks in gc (#6950) 2022-01-18 17:32:19 +01:00
Akuli
80c75fb029 Stricter pyright checks for playsound (#6948) 2022-01-18 16:36:51 +01:00
Alex Waygood
8af5e0d340 Use PEP 585 syntax in Python 2, protobuf & _ast stubs, where possible (#6949) 2022-01-18 07:14:03 -08:00
Nipunn Koorapati
aa885ecd65 Flatten stubtest_allowlist for protobuf generated files (#6944)
I added stubtest testing for generated files within mypy-protobuf.
There are many ways in which the protobuf code is doing *weird*
things and we want the stubs to look a bit different. They're enumerated
in the `stubtest_allowlist.txt` of mypy-protobuf, so squashing them here
so that this one can focus on the non-generated files.
2022-01-18 06:58:48 -08:00
Nikita Sobolev
3cbdb5a1d2 Add __all__ to dis (#6947) 2022-01-18 06:56:24 -08:00
Sebastian Rittau
7d2de33bba Temporarily fix redis version to 4.1.0 (#6952)
Quick fix for #6951
2022-01-18 06:53:37 -08:00
Nikita Sobolev
b47e97f2ea Add __all__ to opcode and use Literal for constants (#6945) 2022-01-18 12:08:54 +02:00
Jelle Zijlstra
ea93779c92 Fix TypeVar argument annotations (#6943)
Arguments like bound= accept type forms like unions, which are not themselves types.
2022-01-18 00:14:40 -08:00
Nikita Sobolev
61d876e4ea Improve contextvars.Context not to use Any where possible (#6942) 2022-01-17 14:56:04 -08:00
Nikita Sobolev
18d746b6b0 Use ParamSpec for contextvars.Context.run (#6940) 2022-01-17 14:00:21 -08:00
Vlad Starostin
e558fedf76 Use more precise return types in asyncio methods (#6937) 2022-01-17 19:56:48 +02:00
Alex Waygood
1eadf1ab35 Use int | Any for types.FrameType.f_lineno (#6935) 2022-01-17 11:32:20 +02:00
Jelle Zijlstra
01f3f8abf6 Remove staticmethod.__new__ and classmethod.__new__ (#6934) 2022-01-17 09:50:04 +01:00
Alex Waygood
6a88d5e7ae Use _typeshed.Self in Python 2, too (#6932) 2022-01-16 14:44:51 -08:00
Jelle Zijlstra
0949e9e90d remove quoted strings (#6933) 2022-01-16 14:29:13 -08:00
Jelle Zijlstra
85318d1b21 Cleanup: do not quote types unnecessarily (#6931)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-01-16 20:18:17 +02:00
Jelle Zijlstra
339bfbbfaa remove "= ..." from top-level values (#6930) 2022-01-16 18:38:00 +02:00
Alex Waygood
425ba77bb2 Remove even more unused TypeVars (#6928) 2022-01-16 08:07:32 -08:00
Alex Waygood
dbcb38a605 Add more missing methods to os._Environ (#6926) 2022-01-16 06:45:11 -08:00
Alex Waygood
af8e37d273 Add # noqa comments to typing.AnyStr (#6925)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
2022-01-16 14:23:22 +02:00
Jelle Zijlstra
e53aa04eb2 Add typing_extensions.is_typeddict (#6923) 2022-01-15 17:02:23 -08:00
Matt Bogosian
f55dff80f0 Override os._Environ.__ior__ (#6921)
Supporting the `|=` operator for `os.environ` was introduced in Python 3.9. However,
this led to false negatives in type checking statements like `os.environ |= {"k": "v"}`
and `os.environ |= [("k", "v")]` because the definition inherited from
`typing.MutableMapping` was insufficient. This addresses that deficiency.

Fixes #6919.
2022-01-15 15:52:31 -08:00
Nikita Sobolev
141ac273ae Remove Any from array.pyi (#6922) 2022-01-15 15:30:58 -08:00
Joseph Young
b119ff2717 Fix shutil.copy2 stub (#6875) 2022-01-15 15:20:08 -08:00
Akuli
5d20635890 pygments: delete _TokenType.__init__ (#6918) 2022-01-14 19:13:14 -08:00
Nikita Sobolev
74d043b9bb Use Literal type in io and _compression (#6917) 2022-01-14 11:32:07 -08:00
Akuli
f9c650d167 Delete duplicate union members (#6916) 2022-01-14 17:41:06 +02:00
Nikita Sobolev
cfcabfd33d Use Literal types in ftplib (#6914) 2022-01-14 13:36:48 +01:00
DatGuy1
7920f502e2 Add get_localzone_name to tzlocal (#6912) 2022-01-14 00:35:24 +01:00
Akuli
df0fe16456 requests: remove an unused allowlist entry (#6911) 2022-01-13 20:35:37 +01:00
Akuli
62f22ef0cc CONTRIBUTING.md: remove duplicate info about how CI runs tests (#6910) 2022-01-13 08:01:20 -08:00
Akuli
b77f994801 Improve _tkinter (#6908) 2022-01-13 17:05:20 +02:00
Jelle Zijlstra
1a0e0a4023 urllib3: allow allowed_methods to be False (#6909) 2022-01-13 15:26:56 +01:00
Akuli
11642f866c Recommend scripts/create_baseline_stubs.py in CONTRIBUTING.md (#6906) 2022-01-13 15:11:20 +01:00
Nikita Sobolev
f42de016b8 Remove misleading comment from staticmethod and classmethod (#6907) 2022-01-13 12:59:28 +01:00
Joseph Young
13e31aa3bf Add stubs for aiofiles.os.path (#6787) 2022-01-13 12:31:19 +02:00
Sebastian Rittau
f7534891f1 Annotate command kwargs arguments (#6721) 2022-01-13 11:22:08 +01:00
Taj
7764a4f4d5 Fix cachetools maxsize argument types (#6901) 2022-01-12 20:58:39 +01:00
Akuli
b2375ddaeb Enable pyright for Python 3.11 (#6904) 2022-01-12 20:07:57 +01:00
Jelle Zijlstra
a4b30c4360 fix typo in _SplitCondition definition (#6903) 2022-01-12 19:51:24 +02:00
Nikita Sobolev
e8cc83e62e Use Literal type in configparser (#6900) 2022-01-12 08:18:24 -08:00
Nikita Sobolev
d108c19675 Use Literal type in datetime (#6899) 2022-01-12 08:12:23 -08:00