Commit Graph
5741 Commits
Author SHA1 Message Date
Alex WaygoodandGitHub 7e79706ddd Clarify why some module-level objects in typing have default values (#7037) 2022-01-28 17:38:25 -08:00
Nipunn KoorapatiandGitHub 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
Alex WaygoodandGitHub 33ecb68603 Fix return annotations of several methods that return self at runtime (#7070) 2022-01-28 17:37:49 -08:00
Nikita SobolevandGitHub 749d3db815 Make asyncio.isfuture a TypeGuard (#7057) 2022-01-28 11:08:31 -08:00
Andrew SoutarandGitHub 220a8d1be9 Add __enter__/__exit__ to pymysql.Connection (#7069) 2022-01-28 19:57:21 +01:00
Alex WaygoodandGitHub 390634b96b Improve weakref.WeakValueDictionary.__init__ (#7068) 2022-01-28 12:35:26 +01:00
Sebastian RittauandGitHub 6746e83f52 Counter/defaultdict: Key type 'str' if initialized with keywords (#7048) 2022-01-28 12:41:58 +02:00
92d135a37c Use TypeGuard in ElementTree.pyi (#7059)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-01-28 11:33:45 +02:00
Sebastian RittauandGitHub 4390b88986 Update redis stubs for 4.1.2 (#7064) 2022-01-28 11:30:23 +02:00
Nikita SobolevandGitHub 67766f282f Use import instead of re-definition of constants in subprocess (#7065) 2022-01-28 00:09:33 -08:00
Sebastian RittauandGitHub b87ebc5375 Don't use a literal for TYPE_CHECKING (#7062)
Partly addresses #7061
2022-01-27 23:51:22 -08:00
Martin FischerandGitHub 40f5fcc82f Add babel.core.get_global (#7063) 2022-01-28 08:46:24 +01:00
Alex WaygoodandGitHub dbb5488b31 Do not use True or False as default values in assignments (#7060) 2022-01-27 13:51:36 -08:00
Nikita SobolevandGitHub d43639d289 Improve asyncio.Future type (#7058) 2022-01-27 12:46:43 -08:00
Alex WaygoodandGitHub 0e185f4087 Improve inspect stubs (#7050) 2022-01-27 09:04:48 -08:00
Alex WaygoodandGitHub f7a7e0b386 Improve unittest.removeHandler in Python 2 (#7055)
This brings the signature in line with the signature of `removeHandler` in Python 3:

https://github.com/python/typeshed/blob/a54e21992c26485edb374e1287a7e9c073d6a9ae/stdlib/unittest/signals.pyi#L11-L14
2022-01-27 09:04:18 -08:00
Alex WaygoodandGitHub 2d8decd237 Backport many ParamSpec-related changes to Python 2 (#7054) 2022-01-27 07:57:26 -08:00
Alex WaygoodandGitHub 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 WaygoodandGitHub e01fc81497 Improve contextvars.Context (#7052)
Similar changes to the ones @sobolevn made in #6942
2022-01-27 07:33:53 -08:00
Nikita SobolevandGitHub 97c490aec0 Fix sys.path_hooks type (#7049)
Docs: https://docs.python.org/3/library/sys.html#sys.path_hooks
2022-01-27 07:21:02 -08:00
Andrew SvetlovandGitHub 56aa2088aa Add BufferedProtocol.eof_received() (#7043) 2022-01-27 12:09:29 +01:00
Jelle ZijlstraandGitHub d5101dced7 Fix float.__rpow__ (#7047)
Fixes #7046.
2022-01-26 19:18:42 -08:00
Andrew SvetlovandGitHub 98afaa4c76 Fix loop.remove_reader() and loop.remove_writer() return types (#7042) 2022-01-26 14:52:15 +01:00
Tom Parker-ShemiltandGitHub 01510448a9 Python 2: io.IOBase.readline accepts None (#7041) 2022-01-26 11:32:20 +02:00
Nikita SobolevandGitHub 9651f6fa04 Use better types for time.get_clock_info (#7040) 2022-01-26 11:09:31 +02:00
Nikita SobolevandGitHub c52bddb459 Use existing type alias in timeit (#7039) 2022-01-26 10:51:26 +02:00
c2182fdd3e Treat validators as classes (#7035)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
2022-01-25 07:43:40 -08:00
Alex WaygoodandGitHub 5d07ebc864 Use PEP 585 syntax in typing and typing_extensions, and remove module-level defaults where possible (#7036) 2022-01-25 16:13:36 +01:00
Nikita SobolevandGitHub bfda5c640b Add mixins module to asyncio (#6789) 2022-01-25 12:53:55 +01:00
fab2a47f9b Use stricter transport types in asyncio subprocess methods (#7026)
Co-authored-by: Vlad Starostin <vladstar@yandex-team.ru>
2022-01-25 11:07:36 +01:00
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
Nikita SobolevandGitHub 20508d05f4 Use ParamSpec in unittest.case (#7012) 2022-01-25 10:25:28 +01:00
Nikita SobolevandGitHub 03a7ac59c9 Use @overload for sunau.open (#7033) 2022-01-25 10:22:56 +01:00
kasiumandGitHub 7bc9c1625e Fix missing return type in pep8ext_naming (#7031) 2022-01-25 09:21:41 +01:00
Nikita SobolevandGitHub 9a89e09753 Removed unused # noqa: F403 (#7032) 2022-01-25 09:21:11 +01:00
kasiumandGitHub 54a37d10b1 Add stubs for flake8_rst_docstrings (#7029) 2022-01-25 09:20:15 +01:00
kasiumandGitHub 0238956f90 Add stubs for pep8-naming (#7030) 2022-01-25 08:39:16 +01:00
Sebastian RittauandGitHub fabd842857 Annotate parts of jsonschema.validators and URIDict (#7025) 2022-01-24 16:42:29 +01:00
Alex WaygoodandGitHub a9ae6b246c Remove many checks from check_new_syntax.py (#7023)
These are now checked by the flake8-pyi plugin, which is better tested and more comprehensive. Removing these checks from `check_new_syntax.py` will reduce the risk of a contributor getting two nearly identical error messages for the same line in a PR.
2022-01-24 07:30:27 -08:00
Alex WaygoodandGitHub 6346464aed Use import instead of type alias in email/message.pyi (#7022) 2022-01-24 13:00:29 +01:00
Nikita SobolevandGitHub c8bfa511f7 Add TODO to support Concatenate in curses (#7018) 2022-01-24 12:13:18 +02:00
Nipunn KoorapatiandGitHub 35064a7f75 Bump to mypy-protobuf 3.2.0 (#7013) 2022-01-23 14:49:33 -08:00
Nikita SobolevandGitHub dc176d70ec Use ParamSpec in unittest.async_case (#7011) 2022-01-23 13:54:06 -08:00
Nikita SobolevandGitHub 166d6c618c Use ParamSpec in profile.Profile.runcall (#7010) 2022-01-23 13:34:40 -08:00
Nikita SobolevandGitHub a4db42ee34 Use ParamSpec in pdb.runcall (#7009) 2022-01-23 13:34:34 -08:00
Nikita SobolevandGitHub 5b45601ed3 Use ParamSpec in cProfile.Profile.runcall (#7008) 2022-01-23 13:34:26 -08:00
Nikita SobolevandGitHub 2244bdfa15 Use ParamSpec in contextlib (#7007) 2022-01-23 13:22:05 -08:00
Nikita SobolevandGitHub 8502c8635f Use ParamSpec for bdb.Bdb.runcall (#7006) 2022-01-23 13:17:16 -08:00
Jelle ZijlstraandGitHub c8471ea631 use flake8-pyi 22.1.0 (#7004) 2022-01-23 12:43:48 -08:00
Nikita SobolevandGitHub e6cf110100 Improve FunctionType.__get__ with @overload (#7005) 2022-01-23 12:38:09 -08:00