Bas van Beek
7edad1034e
Use a typevar in object.__new__ ( #5891 )
2021-08-08 20:45:22 +02:00
Hasan Ramezani
8b9d771b67
Add filters to stdlib/warnings.pyi ( #5889 )
2021-08-08 21:18:47 +03:00
Akuli
24780a3e03
imaplib, nntplib, plistlib, poplib: use lower-case list and dict ( #5890 )
2021-08-08 18:46:23 +02:00
Akuli
ce11072dbe
Big diff: use lower-case list and dict ( #5888 )
2021-08-08 09:26:35 -07:00
Akuli
11f54c3407
add missing arguments to croniter ( #5887 )
...
Co-authored-by: Søren Bjerregaard Vrist <sbv@csis.dk >
Co-authored-by: Sebastian Rittau <srittau@rittau.biz >
2021-08-08 18:33:16 +03:00
Akuli
b1d1551bbc
tkinter.Canvas: types for addtag_foo() and find_foo() methods ( #5886 )
2021-08-08 17:14:45 +03:00
Kyle Altendorf
4b77d454bd
dataclasses: Allow Any keys for the metadata field ( #5823 )
2021-08-08 15:50:52 +02:00
Akuli
c0e2346346
new union syntax in CONTRIBUTING.md ( #5879 )
2021-08-08 15:48:56 +02:00
Akuli
1409f6e892
change ast files to use new union syntax ( #5880 )
2021-08-08 15:47:33 +02:00
Akuli
1154218a0e
switch to new union syntax in third-party stubs ( #5881 )
2021-08-08 15:46:55 +02:00
Akuli
c12c93ebe4
use new union syntax in stdlib/types.pyi ( #5882 )
2021-08-08 15:46:09 +02:00
Akuli
1395318faa
use new union syntax in ctypes/__init__.pyi ( #5883 )
2021-08-08 15:45:28 +02:00
Akuli
df6a211855
Use new union syntax in rest of stdlib ( #5884 )
2021-08-08 15:44:30 +02:00
Akuli
ebacd320a3
support passing coordinate tuples to tkinter.Canvas.create_foobar() ( #5885 )
2021-08-08 15:43:28 +02:00
Matt Vollrath
753cb4caba
Override argument type of DatagramProtocol.connection_made() ( #5873 )
2021-08-08 11:16:26 +02:00
Akuli
ef5b4b6820
setattr: Any --> object ( #5877 )
2021-08-08 11:12:23 +02:00
Akuli
ee487304d7
Big diff: Use new "|" union syntax ( #5872 )
2021-08-08 11:05:21 +02:00
github-actions[bot]
b9adb7a874
Remove unused stubtest allowlist entries ( #5875 )
...
Co-authored-by: hauntsaninja <hauntsaninja@users.noreply.github.com >
2021-08-07 21:06:25 -07:00
Ron Frederick
309e7bda32
Update builtins.pyi ( #5874 )
...
Change getattr/hasattr first argument from Any to object
Fixes #5848
2021-08-07 20:46:03 -07:00
Sebastian Rittau
b4385fa127
Modernize orjson stub ( #5870 )
...
* Use | instead of Union and Optional
* Import Callable from collections.abc, not typing
* Set version in METADATA
* Remove redundant "bytearray" from argument type
* Add obsolete_since metadata field
2021-08-07 08:10:03 -07:00
Akuli
e3f662b648
switch to lower-case "# undocumented" comments ( #5871 )
2021-08-07 08:00:41 -07:00
Anton Grübel
39ede0242c
add missing type hints for __class_getitem__ ( #5869 )
2021-08-07 16:12:53 +02:00
Akuli
1cd719ba8d
Add types to some untyped tkinter.Canvas methods ( #5868 )
...
* coords
* gettags
* itemconfigure, itemconfig
* tag_raise, tag_lower, their aliases
* dtag
Co-authored-by: Sebastian Rittau <srittau@rittau.biz >
2021-08-07 17:01:56 +03:00
Akuli
9301131976
fix tkinter.Canvas tags option ( #5866 )
2021-08-07 15:53:46 +02:00
Anton Grübel
25e9733389
add missing type hints in trace ( #5865 )
...
* Parameter func in Trace.runfunc() became positional only in Python 3.9
* Add is_ignored_filename()
2021-08-07 15:53:26 +02:00
Akuli
36799fd63c
tkinter.Canvas: fix dash ( #5867 )
2021-08-07 15:38:05 +02:00
Henry Schreiner
ae51d5264b
fix: standalone logger functions do not accept arbitrary keywords ( #5862 )
2021-08-06 23:58:24 +02:00
Jukka Lehtosalo
bd416902f7
Fix annotation in selenium.webdriver.remove.webdriver ( #5859 )
...
Docstring description of the argument includes this text:
"Either a string representing URL of the remote server or
a custom remote_connection.RemoteConnection object."
2021-08-06 17:25:25 +01:00
Sebastian Rittau
6ccf5e7d65
Upgrade pytype ( #5858 )
2021-08-06 17:27:02 +02:00
Eric Traut
620a7ceeb8
Remove selenium.webdriver.EdgeOptions for now ( #5855 )
...
We can add it back when selenium 4 is released.
2021-08-06 07:15:31 -07:00
Henry Schreiner
4965e95f84
fix: arbitrary keyword arguments are not accepted in logging functions ( #5849 )
...
While the implementation uses `**kwargs`, this is just forwarded to `_log()`, which accepts a fixed set of arguments.
2021-08-06 10:59:43 +02:00
Jacob Walls
5e0012569d
Change stub of Pillow.Image.new() to accept str for color argument ( #5851 )
2021-08-06 10:56:12 +02:00
Maarten ter Huurne
9bba8a4b83
Correct annotation of headers parameter of HTTP event handlers ( #5854 )
...
* Use HTTPMessage for the headers parameter of HTTP event handlers
While the documentation of `BaseHandler.http_error_default()` describes
the `hdrs` (`headers` in most other handlers) as "a mapping object with
the headers of the error", the implementation that is located in
`URLopener._open_generic_http()` will pass `response.msg` instead,
which is of type `http.client.HTTPMessage`.
* Use Message for the headers parameter of HTTPError
When the standard library constructs `HTTPError`, it will
pass an `http.client.HTTPMessage`, which is a subclass of
`email.message.Message`. Picking the superclass for the
annotations gives users the flexibility to for example
the result of the `email.message_from_X()` functions.
The only thing unique to `HTTPMessage` is the undocumented
`getallmatchingheaders()` method, which is only called by
`http.server.CGIHTTPRequestHandler.run_cgi()`. That class
gets its headers from `http.client.parse_headers()` and not
from `HTTPError`, so I think it's safe to use `Message`
as the annotation.
2021-08-06 10:55:49 +02:00
Eric Traut
59624ff09c
Updated pyright version to 1.1.160 ( #5857 )
...
* Updated pyright version to 1.1.160. Older versions contained a bug that prevented multiple third-party stub packages from having the same top-level module name.
* Disabled "reportUnsupportedDunderAll" diagnostic check for now.
Co-authored-by: Eric Traut <erictr@microsoft.com >
2021-08-06 09:21:57 +02:00
Shantanu
76eeeee4c4
[minor] Clearer formatting for stubtest_third_party output ( #5856 )
...
Co-authored-by: hauntsaninja <>
2021-08-05 20:16:46 -07:00
an onion
f30d6f6fd0
Add stubs for posix_spawn and posix_spawnp ( #5846 )
2021-08-05 18:55:26 -07:00
Sebastian Rittau
74c3d9a093
Modernize freezegun stubs, set version ( #5843 )
2021-08-04 15:57:12 -07:00
Anton Grübel
34d94d780c
add ssl.get_ciphers ( #5838 )
2021-08-04 15:39:46 -07:00
Sebastian Rittau
840df19501
Switch to Python 3.10.0-rc.1 in CI ( #5845 )
...
* Switch to Python 3.10.0-rc.1 in CI
* Add module argument to ForwardRef.__init__()
2021-08-04 07:14:38 -07:00
Jon Dufresne
b2e429cd41
Add typing for TarFile._extract_member method ( #5841 )
...
Refs: #2673
2021-08-03 08:53:35 +02:00
Bas van Beek
475417fa97
Mark final and unhashable classes in types as such ( #5837 )
2021-08-02 13:46:14 -07:00
Sebastian Rittau
acc576659a
Use Python 3.10 beta 4 instead of beta 1 in CI ( #5839 )
...
Quote all Python versions to make sure they are interpreted as strings,
not floats.
2021-08-02 07:30:32 -07:00
Stephen Rosen
6a9c7aff99
Add missing exceptions to requests __init__.pyi ( #5840 )
2021-08-02 07:29:28 -07:00
Oleg Höfling
836690e150
Add attribute types to code.InteractiveInterpreter and code.InteractiveConsole ( #5830 )
...
* mark undocumented attributes
* use pep 585 generics, replace optional types with pep 604-style hints
2021-08-02 14:04:42 +02:00
Ran Benita
2d0f3c5211
python2/tempfile: dir argument can be None ( #5836 )
2021-08-02 11:36:19 +02:00
Sebastian Rittau
eb431196fa
CI: use mypy version from requirements for primer ( #5834 )
2021-08-02 00:51:46 -07:00
Oleg Höfling
41630486e3
Add Typeguard back to inspect.isclass() return type ( #5829 )
2021-08-02 09:19:11 +02:00
Anton Grübel
1f3c703993
add missing type hints in tabulate ( #5825 )
2021-08-02 09:07:49 +02:00
Eric Traut
ea4be02bab
Redefined dataclasses.KW_ONLY ( #5826 )
...
Redefined dataclasses.KW_ONLY so it's a type alias rather than a class instance. Class instances are illegal to use within a type annotation.
2021-08-01 08:06:48 -07:00
Jelle Zijlstra
e1b9ab3372
Remove redundant import from typing ( #5827 )
...
Fixes quora/pyanalyze#221 .
2021-07-30 22:55:33 -07:00