Commit Graph

490 Commits

Author SHA1 Message Date
J Rob Gant
99aedf4724 Tag.attrs is a dict, instead of an immutable Mapping (#7253) 2022-02-18 00:46:49 +02:00
Sebastian Rittau
ae39348d7a Annotate Session.execute() and Result (#7252)
* Annotate return type of Session.execute()

* Annotate Result return types

* Remove sub-class overrides with identical signatures
2022-02-17 09:27:55 -08:00
Sebastian Rittau
e3742686b1 Update to redis 4.1.4 (#7247)
Closes: #7245
2022-02-17 01:33:33 -08:00
Sebastian Rittau
4a0dabda1b Various SQLalchemy type improvements (#7238)
* Make ColumnOperators and ColumnElement generic
* Overload Session.query() return type
* Annotate ColumnOperators methods
2022-02-16 19:03:48 -08:00
Sebastian Rittau
44bcf5eed0 Various SQLalchemy fixes and improvements (#7237) 2022-02-16 06:46:11 -08:00
Alex Waygood
1341a34525 Remove unused allowlist entries in babel and requests (#7233) 2022-02-15 16:26:13 -08:00
aimileus
5081f684c0 Fix argument types of pytz.tzinfo.StaticTzInfo (#7184)
The argument is_dst of the functions StaticTzInfo.localize and
StaticTzInfo.normalize are ignored, and only present for compatibility with
DstTzInfo. The functions in DstTzInfo also accepts None, so for compatibility,
StaticTzInfo should accept them as well.

[^1] 2ed682a7c4/src/pytz/tzinfo.py (L112)
2022-02-13 07:21:30 -08:00
Shantanu
3a2ce92d32 singledispatch: fix lint (#7178)
Co-authored-by: hauntsaninja <>
2022-02-11 17:53:01 -08:00
James Morris
7e5f3c38bd Add singledispatchmethod to singledispatch (#6089) 2022-02-11 17:23:49 -08:00
Sebastian Rittau
84b5e73396 protobuf doesn't support Python 2 anymore (#7176)
Remove Python-2-only package "futures"
2022-02-11 08:10:31 -08:00
Alex Waygood
da7604a968 Add stubs for pyflakes (#7175) 2022-02-11 12:21:28 +01:00
Sebastian Rittau
97a327b984 fpdf2: Correct annotations of @contextmanager methods (#7172) 2022-02-10 18:15:09 +01:00
Fares Ahmed
7efda0f21a Improve toml typings (#7146)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
2022-02-10 17:55:31 +02:00
DataGhost
7bb6ce7083 Added missing import for JSONDecodeError (#7171)
Co-authored-by: DataGhost <git@dataghost.com>
2022-02-09 11:31:55 -08:00
Roman Joost
2381066c15 google-cloud-ndb: Fix incorrect type definition for validator (#7116)
This function was mistakenly typed as `Callable[[Property], object] |
None`, however the actual function accepts two parameters of type
`Property, value`. The value can be of any type. Strictly speaking, the
type corresponds to the type of the property which is defined at runtime.

Fixes #7103
2022-02-08 07:09:04 -08:00
Itai Steinherz
670009ca22 Improve sock typing in Paramiko stub (#7156) 2022-02-08 07:08:14 -08:00
Nipunn Koorapati
96a09f6a35 protobuf: Bring back Message.Extensions (#7154) 2022-02-08 13:51:41 +01:00
Alex Waygood
494481a0ae Improve a bunch of __(deep)copy__ methods (#7148) 2022-02-06 15:40:44 -08:00
Alex Waygood
a62fd92fb0 Improve some in-place BinOp methods (#7149) 2022-02-06 15:36:57 -08:00
Fares Ahmed
62e33cbbd5 Add stubs for chevron package (#7139)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
2022-02-05 21:38:19 +02:00
Aaron Sykes
ebcdcfa24e Makes DESCRIPTOR non nullable again (#7125)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-02-04 22:05:58 +02:00
Roman Joost
fc60d02c3e Fix mistyped get_by_id class methods (#7120)
The types for these class methods were mixed up. The async method
returned an optional `Model`, while the synchronous method returned a
`Future`. It's the other way around.

Fixes #7103
2022-02-02 15:59:02 -08:00
Alex Waygood
26e8959279 Use _typeshed.Self in docutils.VersionInfo and os.sched_param (#7117) 2022-02-02 23:30:39 +01:00
Alex Waygood
15d76b072a Improve classmethods in paramiko stubs (#7113) 2022-02-02 22:15:26 +01:00
Alex Waygood
b4e97a1909 Improve __enter__ & constructor methods (#7114) 2022-02-02 22:14:59 +01:00
klaerik
b327f64d9a Add iterable and ServerPool types to ldap3 Connection.server parameter (#7101) 2022-02-02 18:59:53 +01:00
Nipunn Koorapati
90f5422df7 Add/fix types to a bunch of non-generated protobuf files (#7017) 2022-02-02 12:30:39 +01:00
Rajiv Bakulesh Shah
beac964588 Redis: Annotate .lolwut() (#7104) 2022-02-02 11:18:11 +01:00
UncleOwen
8631ed9e57 requests.Session: Accept hooks and lists of hooks (#7094) 2022-01-31 11:29:05 +01:00
Sebastian Rittau
cb3c1bb638 Replace IO with protocols (#7092) 2022-01-31 11:39:56 +02:00
Rajiv Bakulesh Shah
064317a72e Redis: Annotate .pttl(), .dump(), and .getdel() (#7091) 2022-01-31 08:30:46 +01:00
Shantanu
b88a6f19cd Upgrade black version (#7089) 2022-01-30 16:27:06 -08:00
Alex Waygood
45a2dad83c Reduce use of Any in equality methods (#7081)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
2022-01-30 00:59:00 +02:00
lovetox
9aeecb4c35 pyOpenSSL: Adapt to changes in 22.0.0 (#7080) 2022-01-30 00:05:59 +02:00
Nipunn Koorapati
470ea31ccd Use relax_strict_optional_primitives on protobuf generated code (#7038)
Per the suggestion in https://github.com/dropbox/mypy-protobuf/issues/344
This generates more permissive constructors (which protobuf itself actually
accepts).

Philosophically, I think it makes sense for the generated code hosted on
typeshed to be most permissive, while the generated code of individual
projects can make individual decisions (defaulting to less permissive).
2022-01-28 17:37:57 -08:00
Andrew Soutar
220a8d1be9 Add __enter__/__exit__ to pymysql.Connection (#7069) 2022-01-28 19:57:21 +01:00
Sebastian Rittau
4390b88986 Update redis stubs for 4.1.2 (#7064) 2022-01-28 11:30:23 +02:00
Martin Fischer
40f5fcc82f Add babel.core.get_global (#7063) 2022-01-28 08:46:24 +01:00
Alex Waygood
dbb5488b31 Do not use True or False as default values in assignments (#7060) 2022-01-27 13:51:36 -08:00
Alex Waygood
2d8decd237 Backport many ParamSpec-related changes to Python 2 (#7054) 2022-01-27 07:57:26 -08:00
Alex Waygood
5b39d07cd9 Add ParamSpec to decorator.contextmanager (#7051)
There may be other places in this package where `ParamSpec` could be used, but this one is the most clear-cut.
2022-01-27 07:35:19 -08:00
Alex Waygood
e01fc81497 Improve contextvars.Context (#7052)
Similar changes to the ones @sobolevn made in #6942
2022-01-27 07:33:53 -08:00
Sebastian Rittau
c2182fdd3e Treat validators as classes (#7035)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
2022-01-25 07:43:40 -08:00
Mehdi Drissi
b8bea1b2c9 Improve trait signature in mypy_extensions.pyi (#7027)
Co-authored-by: Mehdi Drissi <mdrissi@snapchat.com>
2022-01-25 11:03:54 +01:00
kasium
7bc9c1625e Fix missing return type in pep8ext_naming (#7031) 2022-01-25 09:21:41 +01:00
kasium
54a37d10b1 Add stubs for flake8_rst_docstrings (#7029) 2022-01-25 09:20:15 +01:00
kasium
0238956f90 Add stubs for pep8-naming (#7030) 2022-01-25 08:39:16 +01:00
Sebastian Rittau
fabd842857 Annotate parts of jsonschema.validators and URIDict (#7025) 2022-01-24 16:42:29 +01:00
Nipunn Koorapati
35064a7f75 Bump to mypy-protobuf 3.2.0 (#7013) 2022-01-23 14:49:33 -08:00
Jelle Zijlstra
3d28f0981f bs4: Expose bs4.SoupStrainer and bs4.Tag (#7002) 2022-01-23 19:11:38 +02:00