Jon Dufresne
0570cd9f9c
Update GitHub actions to their latest versions ( #8160 )
...
The actions/setup-python now always requires a version specified.
2022-06-26 11:36:15 +02:00
Jon Dufresne
a9a612df98
Add certifi.contents() ( #5989 )
...
Added in commit:
https://github.com/certifi/python-certifi/commit/3e585603ff265552c2e137d064ea092d51332602
Available since version 2020.04.05.
2021-08-31 21:10:04 -07:00
Jon Dufresne and Akuli
2d8fe52d08
Remove geoip2 stubs in favor of upstream ( #5964 )
...
The geoip2 package has shipped a PEP 561 py.typed file since Jul 28,
2020.
Co-authored-by: Akuli <akuviljanen17@gmail.com >
2021-08-31 23:15:55 +02:00
Jon Dufresne
4381e0a558
Remove @python2-only third party stubs that aren't also dependencies ( #5975 )
...
Closes #5969
2021-08-30 14:23:28 +02:00
Jon Dufresne
9d02cd265d
Remove leftover openssl-python in pyright configuration ( #5976 )
...
The package was renamed in a98fceca2f .
2021-08-28 19:05:24 +02:00
Jon Dufresne
33b08cb3d7
Remove leftover pyright tornado configuration ( #5974 )
...
tornado was removed in 5a7f25584e .
2021-08-28 08:29:40 -07:00
Jon Dufresne
b50ebafa79
Tighten return type of OpenSSL Connection.get_protocol_name() ( #5972 )
...
The method always returns a str. See implementation at:
https://github.com/pyca/pyopenssl/blob/30e82d4ba5e3817a77e212540477da701460e988/src/OpenSSL/SSL.py#L2420-L2430
If version were ever None, it would raise an exception on the .decode()
line.
2021-08-27 10:54:27 -07:00
Jon Dufresne
da8d291bdb
Update versions of Python 2 stubs to prepare for eventual removal ( #5970 )
2021-08-27 18:15:13 +02:00
Jon Dufresne
2e1e91e3c8
Remove tornado stubs in favor of upstream ( #5965 )
...
The tornado package has shipped a PEP 561 py.typed file since Mar 1,
2019.
2021-08-27 08:55:41 +02:00
Jon Dufresne
ac39a73d38
Add type for undocumented copyreg.dispatch_table ( #5959 )
2021-08-26 00:59:23 +02:00
Jon Dufresne
b2e429cd41
Add typing for TarFile._extract_member method ( #5841 )
...
Refs: #2673
2021-08-03 08:53:35 +02:00
Jon Dufresne and Jelle Zijlstra
4166a416f6
Correct return type of click.testing.CliRunner.isolation() ( #5103 )
...
The method returns a tuple of io.BytesIO objects that hold the temporary
stdin and stdout. By correcting the type, it allows usages of
io.BytesIO.getvalue() to pass type checking.
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com >
2021-05-16 21:45:00 +02:00
Jon Dufresne
b03cd49a87
Type optparse.Option.default attribute ( #5080 )
...
https://github.com/python/cpython/blob/1e3c68246ee738b5ec5450b1eb39af2fca300cb9/Lib/optparse.py#L458
2021-02-28 09:15:38 -08:00
Jon Dufresne
c6ede41cd0
Correct and update several optparse types ( #4897 )
...
The first positional argument to HelpFormatter.format_option() and
HelpFormatter.format_option_strings() is a Option instance, not an
OptionParser.
Added some attributes to the Option class:
- callback
- callback_args
- callback_kwargs
- help
- metavar
The OptionParser.option_groups attribute is a list of OptionGroup
instances, not OptionParser instances.
The method OptionParser.add_option_group() returns a OptionGroup
instance (the one created/added), not an OptionParser instance.
2021-01-04 15:54:55 +01:00
Jon Dufresne
61c61d2db4
Precise return type of HelpFormatter.format_option_strings() ( #4896 )
...
Always returns a str:
https://github.com/python/cpython/blob/v3.9.1/Lib/optparse.py#L366
2021-01-03 16:07:12 -08:00
Jon Dufresne
2cb6b14834
Add type for distutils.command.install.SCHEME_KEYS ( #4863 )
2020-12-27 19:54:43 +01:00
Jon Dufresne
dc80863254
Update isort URL to new location: https://github.com/PyCQA/isort ( #4841 )
2020-12-19 22:15:09 -05:00
Jon Dufresne
3ae99d153b
Allow Python 2 unicode for some click interfaces ( #4825 )
...
Helps Python 2 code using:
form __future__ import unicode_literals
On Python 2, these interfaces are compatible with both str and unicode.
2020-12-15 20:51:43 +01:00
Jon Dufresne
66c3945ca4
Remove certifi.old_where ( #3436 )
...
The function was removed from the API in commit (Nov 26, 2018):
https://github.com/certifi/python-certifi/commit/a462d21c3f491635ed11a6aaa4e2022d1ca4cace
2019-11-03 18:26:43 +01:00
Jon Dufresne
0ee7c3c38b
Update __import__ function annotations ( #3188 )
...
Per the docs, globals/locals is an optional argument.
Additionally, globals/locals can be any mapping type, not only a dict.
Likewise, fromlist can be any sequence (the docs mention a tuple, not a
list).
The function returns a ModuleType, not Any.
2019-08-16 11:03:00 +02:00
Jon Dufresne
679e1a9a8c
Update URL: python/black → psf/black ( #3180 )
2019-08-10 13:31:58 -07:00
Jon Dufresne
02401c836f
Add type annotations for Python 3 html.entities ( #3161 )
2019-07-31 15:46:16 +02:00
Jon Dufresne
f2fdb54765
Precise the type of Python 2 htmlentitydefs module ( #3163 )
...
The code and documentation specifies the values specifically as
dictionaries.
2019-07-31 15:45:50 +02:00
Jon Dufresne
edee7cfb3c
Remove unused import from stdlib/2/htmlentitydefs.pyi ( #3162 )
2019-07-31 09:06:02 +02:00
Jon Dufresne
910c71050d
Update Black URL ( #2950 )
2019-05-04 11:42:44 -04:00
Jon Dufresne
47f22a341e
Add def __getattr__(name) -> Any: ... to all docutils stubs ( #2439 )
...
The stubs are very incomplete causing false positive when used. Add a
fallback to until they can become more complete.
2018-09-13 21:59:13 +02:00
Jon Dufresne
2b022d18a4
Add stub for unittest.mock ( #731 )
...
Stub generated by stubgen.
Fixes #372
2016-12-07 08:05:01 -08:00
Jon Dufresne
4b369945d0
Change struct fmt argument to str instead of AnyStr ( #669 )
...
Switching between a bytes fmt and str fmt argument can cause a BytesWarning
when running Python with the -b command line argument.
2016-11-07 16:58:25 -08:00