Commit Graph

2328 Commits

Author SHA1 Message Date
Shantanu
a8412b601c _heapq: add key for py2, mark positional-only args (#3696)
* _heapq: mark positional-only args

* _heapq: add key argument for py2
2020-02-01 09:28:54 -08:00
Shantanu
a8f31b9c51 _random: mark positional-only args (#3697) 2020-02-01 09:28:15 -08:00
Shantanu
f4787297e9 ast: update for py38 (#3698) 2020-02-01 09:25:56 -08:00
Shantanu
1ca071a732 collections.Counter: fix default values, allow passing None (#3699) 2020-02-01 09:25:03 -08:00
Shantanu
f96fe6abc0 xml.etree.ElementTree: update for py38 (#3700) 2020-02-01 09:23:11 -08:00
Shantanu
4d698711ea various errors: fix base class (#3702) 2020-02-01 09:15:23 -08:00
Shantanu
123d2cb093 argparse: fix RawTextHelpFormatter base class (#3703) 2020-02-01 09:14:29 -08:00
Shantanu
70f0dc1491 builtins: fix bytearray.fromhex (#3691)
bytearray.fromhex is a classmethod, not a staticmethod
Mark positional-only args in the other fromhex's
2020-01-30 18:58:36 -08:00
Shantanu
9798c243c9 builtins: start can be passed by keyword to sum in 3.8 (#3692) 2020-01-30 18:56:50 -08:00
Shantanu
10145fcc3a webbrowser: fix platform availability, register (#3694)
* webbrowser: fix platform availability

* webbrowser: add default value to arg instance of register
2020-01-30 18:55:57 -08:00
Shantanu
8b5e7f3efd _curses: fix setupterm, mark positional-only args (#3690)
* _curses: mark positional-only args

* _curses: fix setupterm
2020-01-30 18:53:08 -08:00
tikki
bd55cae8b6 fix arg name to socket.getaddrinfo for py3 (#3689) 2020-01-30 18:45:38 -08:00
Brian Maissy
48d77d5f06 update SectionProxy.getint()/float/bool stubs to match those of ConfigParser (#3687) 2020-01-30 09:37:29 +01:00
Cyril Roelandt
47409f3e25 Add missing stubs for logging.handlers.WatchedFileHandler. (#3686)
Co-authored-by: CyrilRoelandteNovance <cyril@redhat.com>
2020-01-29 08:27:12 -08:00
Brian Maissy
e5999ac76b make stubs for configparser.getint()/float/bool accept a generically-typed fallback (#3684)
Closes #3681
2020-01-29 14:43:46 +01:00
Jan Verbeek
95cafc0b7c sys: Correct types of sys.displayhook, sys.excepthook and variants (#3673)
displayhook should accept any object, not just integers.

displayhook and excepthook may be assigned to, so they should be
Callable values rather than function definitions. That way it's fine
to assign a function with different argument names. Their dunder
variants are supposed to be constant.
2020-01-29 11:25:35 +01:00
Shantanu
46d9b38fa1 json: mark kwonly args, improve decode (#3679)
* json: mark args as kwonly for py36 on
* json: add undocumented arg to JSONDecoder.decode
2020-01-29 11:20:08 +01:00
Shantanu
26fd2b7968 sqlite3: alias OptimizedUnicode to str for py3 (#3678) 2020-01-29 11:18:19 +01:00
Shantanu
ac234f2592 turtle: various improvements (#3677)
* turtle: add None and default value to overloads
* turtle: add default value to write_docstringdict
* turtle: fix _Screen.setup
2020-01-29 11:17:16 +01:00
Shantanu
b3a9bfd5db pyexpat: improve ParserCreate, mark positional-only args (#3676) 2020-01-29 11:11:56 +01:00
Shantanu
119547b931 xml: fix default values, mark positional-only args (#3675)
Note xml.etree.ElementTree.TreeBuilder.start has a default value for
attrs in the C-accelerated module.
2020-01-29 11:09:53 +01:00
Shantanu
437b6947eb dbm: mark positional-only args (#3674) 2020-01-29 11:03:55 +01:00
Jacob Ilias Komissar
eb6ce3cacb Fix socket.socket.ioctl (#3669)
Fixes #3495

Co-authored-by: Niels Buwen <nielsbuwen@users.noreply.github.com>
2020-01-27 21:25:33 -08:00
Ilaï Deutel
e7ddb21ae6 range.index() takes exactly one argument (#3668) 2020-01-27 20:19:12 -08:00
Niklas Fiekas
64fea9c543 asyncio: get_returncode() and get_pipe_transport() can return None (#3663) 2020-01-26 12:38:11 -08:00
Oleg Höfling
99d79696d7 accept optional extras in asyncio.BaseTransport init (#3661)
Signed-off-by: Oleg Höfling <oleg.hoefling@gmail.com>
2020-01-26 15:48:44 +01:00
Jason Gilholme
76b295a669 subprocess: Make stdin, stdout & stderr Optional for py3 to match py2 (#3652)
Closes: #3646
2020-01-26 15:21:58 +01:00
Shantanu
b972427ad4 configparser: fix various arguments (#3632)
* configparser: fix various arguments

* configparser.ConfigParser: inherit __init__
2020-01-26 13:51:04 +01:00
Shantanu
ce42c16e03 cmath: fix log, mark positional-only args (#3659) 2020-01-25 22:18:23 -08:00
Shantanu
6a878bf715 audioop: mark positional-only args (#3658) 2020-01-25 20:06:53 -08:00
Shantanu
fd7855185e _thread: fix type of TIMEOUT_MAX (#3657) 2020-01-25 20:00:55 -08:00
Shantanu
d5851eca6f io: minor fixes for arguments (#3642) 2020-01-24 09:22:19 +01:00
Shantanu
ed95668638 builtins.pow: improve annotation (#3647) 2020-01-24 09:20:46 +01:00
crusaderky
03c9faa375 Pickle 5 (#3636) 2020-01-23 19:42:39 +01:00
Shantanu
edd1ec8a62 _codecs: fix various issues (#3649)
* _codecs: mark positional-only args as such
* _codecs: rename __data to __str where relevant
* _codecs: fix utf_16_ex_decode and utf_32_ex_decode
* _codecs: fix default value of charmap_encode
* _codecs: fix availability of charbuffer_encode
2020-01-23 15:38:58 +01:00
Shantanu
32563e9e1d builtins: mark positional-only args as such (#3648) 2020-01-23 15:35:45 +01:00
Shantanu
b732342333 subprocess: add endtime for py36 and below (#3641) 2020-01-23 15:11:54 +01:00
Shantanu
295c20211d ssl: fix arguments for py36 and below (#3640) 2020-01-23 15:10:36 +01:00
Shantanu
cae73edebf http.cookies: add LegalChars for py36 and below (#3639) 2020-01-23 15:05:49 +01:00
Shantanu
7e6dbc4393 asyncio: fix various version availability (#3638) 2020-01-23 15:04:04 +01:00
Shantanu
324d18b956 decimal: remove non-existent args from py3, mark positional-only args (#3633) 2020-01-23 15:00:48 +01:00
Shantanu
b4da2b694b csv: re-export Dialect from _csv (#3613)
Resolves #3611

Tested with mypy on:
```
f = open("asdf.csv", "w")

csv.writer(f)
csv.writer(f, dialect=csv.excel)
csv.writer(f, dialect=csv.excel())

csv.DictReader(f)
csv.DictReader(f, dialect=csv.excel)
csv.DictReader(f, dialect=csv.excel())

class CustomDialect(csv.Dialect):
    delimiter = "%"

csv.writer(f, dialect=CustomDialect)
csv.writer(f, dialect=CustomDialect())
```
2020-01-22 17:11:52 -08:00
Shantanu
8b241b5243 asyncio: fix SendfileNotAvailableError availability (#3631) 2020-01-22 17:27:58 +01:00
Shantanu
e3dfaa6608 hashlib: fix arguments (#3626)
* hashlib: fix argument names
* hashlib: add default values to scrypt, make args Optional
2020-01-22 10:20:40 +01:00
Shantanu
e048dd2b3b heapq: fix arguments (#3645)
* heapq: mark positional-only args

* heapq: fix types for args with default value None
2020-01-21 17:52:38 -08:00
Shantanu
d889de033a argparse: various fixes (#3630)
- add_subparsers uses keyword-only args
- required parameter is new in py37
2020-01-21 19:38:58 +01:00
Shantanu
d2da7d17c2 difflib: various fixes (#3629)
- add undocumented parameters to IS_LINE_JUNK and IS_CHARACTER_JUNK
- add kw-only charset to make_file
2020-01-21 19:30:05 +01:00
Shantanu
39d72bb61e distutils: various fixes (#3634)
- fix parameter name in `move_file`
- make `setup` keyword-only args keyword-only
- add undocumented (positional!) `swig_opts` parameter to `Extension`
2020-01-21 07:08:48 +01:00
Shantanu
666ecc7cca pprint: fix argument names (#3627)
This matters for passing in arguments by keyword
2020-01-20 09:02:23 +01:00
Shantanu
b374154705 operator: mark positional-only args (#3628) 2020-01-20 09:01:02 +01:00