Ville Skyttä
0956a24eb2
bytes/bytearray.startswith fixes ( #2696 )
2018-12-17 18:57:07 +01:00
Dave Halter
5c69373890
macpath, os/path, posixpath and ntpath should basically be the same files ( #2637 )
2018-12-17 15:02:18 +01:00
gnattishness
ea0dbfa313
Fix typo for Message.add_attachment in message.pyi ( #2697 )
2018-12-15 19:11:15 -08:00
Michael J. Sullivan
95afb86022
Move posix.stat_result to os.stat_result on python 3 ( #2683 )
...
In python 3, posix.stat_result is a re-export of os.stat_result, while
in python 2 it was the reverse. Update typeshed to reflect this.
2018-12-13 19:20:42 +01:00
Andrew Svetlov
b9be76c255
Task.current_task() and Task.all_tasks() have an optional loop parameter ( #2690 )
2018-12-12 13:18:18 -08:00
Kostya Esmukov
2469a3ccda
Fix signature of ConfigParser's dict_type argument ( #2684 )
2018-12-12 08:22:31 +01:00
Sander Voerman
1b24d80087
Add get_loop() to asyncio.Future [Python 3.7] ( #2680 )
2018-12-09 21:37:37 +01:00
Guido van Rossum
e08a5ac367
Tweak how ast.pyi imports typing ( #2668 )
...
When we import typeshed internally at Dropbox, somehow the fact that
these files are all stubs gets lost (it's a long story...). This
causes errors like this:
.../stdlib/2/ast.pyi:6: error: Name 'typing' already defined (by an import)
The quickest way around this is to rename the import to _typing.
2018-12-04 17:25:23 +01:00
Brandt Bucher
ac8f5da324
Replace Loader with PEP 451 _Loader protocol in _importlib_modulespec.pyi annotations. ( #2626 )
2018-12-03 21:26:37 +01:00
Utkarsh Gupta
bee236fb5d
builtins.pyi: Return complex from __(r)pow__() ( #2662 )
...
Closes #1406
2018-12-03 14:21:27 +01:00
Utkarsh Gupta
9f9d15e311
itertools.pyi: Allow omitting repeat argument in Python 3 ( #2659 )
...
Fixes #2561
2018-11-30 15:58:21 -08:00
Guido van Rossum
de50614957
Stop inheriting Sized in collection ABCs ( #2658 )
...
Instead define abstract __len__ in affected classes.
Fixes #2655 without breaking
https://github.com/rominf/ordered-set-stubs/issues/1
2018-11-30 13:10:35 -08:00
Jukka Lehtosalo
84548f5bba
Revert "fix list concatenation ( #2404 )" ( #2653 )
...
The fix caused regressions for mypy that are difficult to
fix. See https://github.com/python/mypy/issues/5492 for
context.
This reverts commit 1a42a2c3ea .
2018-11-29 12:20:29 -08:00
anentropic
98e63d2d2f
staticmethod and classmethod can wrap any callable ( #2650 )
...
Closes : #2645
2018-11-29 14:36:08 +01:00
Brandt Bucher
1857435e6f
types.CodeType.co_filename isn't Optional. ( #2639 )
2018-11-27 20:53:05 -08:00
Florian Bruhin
489180ffcc
Add stubs for the faulthandler stdlib module ( #2627 )
2018-11-26 16:39:47 +01:00
Dave Halter
96ed18f6e1
Add posix attributes for Python 3 ( #2631 )
...
The posix module in Python 3 lacks some attributes that are present in both
os/__init__.pyi and Python 2's posix.pyi
2018-11-26 14:39:12 +01:00
Dave Halter
84daf7c93b
Add __getnewargs__ to float, int, bool, str, bytes, unicode ( #2632 )
2018-11-26 10:43:12 +01:00
Sebastian Rittau
517d2b6012
Remove unneeded ignores ( #2624 )
2018-11-23 09:51:44 -08:00
Brandt Bucher
7685462672
Add complete annotations to builtins.compile. ( #2606 )
2018-11-20 17:48:24 +01:00
Sebastian Rittau
cd75801aa5
Replace non-ellipsis default arguments ( #2550 )
2018-11-20 07:35:06 -08:00
Ruud van Asseldonk
b7d6bab83f
Fix stub for SpooledTemporaryFile ( #2452 )
...
Fixes #2431
2018-11-20 11:03:21 +01:00
Jakub Stasiak
9a92056105
Document the Python 3.7 variant of subprocess.check_output ( #2592 )
2018-11-19 09:41:05 +01:00
Summon528
9c45638650
Fix return annotation for asyncio.as_completed() ( #2600 )
2018-11-19 09:35:22 +01:00
Brandt Bucher
b29b239f17
Add optimize parameter to builtins.compile. ( #2605 )
...
In Python 3, `builtins.compile` takes 6 arguments (`source`, `filename`, `mode`, `flags=0`, `dont_inherit=False`, `optimize=-1`). This change adds the last `optimize` parameter, which is new since Python 2.
2018-11-16 23:35:32 -08:00
Adam Simpkins
c1dbdc7e26
Fix the return type for unittest.TestCase.run() ( #2603 )
...
In Python 3 this method returns None if the test is skipped, and a
TestResult otherwise.
2018-11-16 10:32:42 +01:00
Gregory P. Smith
cd4572e43c
Annotate some missing http client and urllib APIs. ( #2582 )
2018-11-12 21:54:57 +01:00
Dev Aggarwal
c7b0e60032
Add missing stubs for multiprocessing.connection module. ( #2596 )
2018-11-11 16:54:11 +01:00
Peter Pentchev
f8e5222c46
unittest.TestCase.assertRaises(): BaseException ( #2594 )
...
In Python 3, just as in Python 2, the expected exception argument to
assertRaises() and assertRaisesRegex() must be a subtype of
BaseException, not just of Exception.
Closes #2593
2018-11-08 18:42:51 -08:00
Marco Leogrande
e58a338d51
Fix typo in typing.pyi ( #2595 )
2018-11-08 18:41:53 -08:00
Jelle Zijlstra
1a42a2c3ea
fix list concatenation ( #2404 )
...
Fixes #2383 , python/mypy#5492 .
2018-11-08 06:42:57 -08:00
MatthewPScott81
744f572c68
deque init() optional maxlen ( #2585 )
...
Closes #2581
2018-11-04 23:06:47 +01:00
edgchen1
1989265e1f
Make inspect.unwrap() stop argument optional. ( #2583 )
...
Closes #2574
2018-11-03 02:12:49 +01:00
Ethan Smith
a01335421d
Make _winapi.SetNamedPipeHandleState args Optional ( #2571 )
...
As can be seen here: https://github.com/python/cpython/blob/master/Modules/_winapi.c#L1436 the arguments can be Optional (and are used as such in CPython).
2018-10-31 08:20:54 +01:00
Siva Chandra
701f970c6f
Add overrides for the methods 'readlines' and 'writelines' in TextIOBase. ( #2551 )
...
Without the overrides, MRO will pick the methods in IOBase which have
the wrong signatures.
2018-10-30 22:44:18 +01:00
PRAJWAL M
13e84dc004
unittest: Complete assertRaisesRegex ( #2568 )
...
fixes #2523
2018-10-30 09:11:16 -07:00
Sebastian Rittau
e3a79d0ce6
Remove third_party/3/enum.py ( #2563 )
...
All Python 3 versions supported by typeshed (3.4+) have enum as part
of the standard library.
Make the third-party Python 2 version consistent with the Python 3 version.
2018-10-27 08:54:56 -07:00
Andrew Svetlov
07bc1c9997
Fix return annotation for loop.call_later() and loop.call_at() ( #2559 )
2018-10-26 14:15:32 +02:00
Sebastian Rittau
0730fe5fcb
Fix return of patch() and patch.multiple() ( #2520 )
...
* Fix return of patch() and patch.multiple()
* Update third party mock as well
2018-10-25 20:55:11 -07:00
Michael J. Sullivan
ffeede30d2
Make SyntaxError.offset be optional ( #2557 )
2018-10-25 13:54:55 -07:00
Rebecca Chen
3d8a8ec45d
Fix py3 types of inspect.FullArgSpec.var(args|kw) ( #2556 )
2018-10-25 10:45:59 -07:00
Sebastian Rittau
006a79220f
Flake8 fixes ( #2549 )
...
* Fix over-indented continuation lines
* Fix under-indented continuation lines
* Fix whitespace around default operator problems
* Limit line lengths
* Fix inconsistent files
2018-10-24 07:20:53 -07:00
Jerome Leclanche
f362cf47fa
Fix email.parser.BytesParser and BytesHeaderParser method args ( #2548 )
...
Fixes #2502
2018-10-24 06:22:08 -07:00
Michael J. Sullivan
da6e18caf7
Make os.dup2 return int on Python 3.7 ( #2543 )
...
* Add inheritable param also
2018-10-23 23:15:35 +02:00
Adam Simpkins
79b2df4b24
os.DirEntry.stat() accepts a follow_symlinks keyword argument ( #2538 )
...
This function accepts the same arguments as the is_file() and is_dir()
methods in this class.
This also marks the follow_symlinks arguments to `is_dir()` and
`is_file()` as keyword only.
2018-10-23 23:13:33 +02:00
Michael Lee
53d12c0a6c
Makes enums accept objects in the argument type ( #2539 )
...
Fixes problems with using enums with the --disallow-any-expr flag.
2018-10-23 09:52:15 +02:00
Dave Halter
a437fcc886
Add attributes to int and float ( #2529 )
...
* real, imag, conjugate all exist on int and float
* numerator, denominator exists on int
2018-10-23 00:44:36 +02:00
Dave Halter
a972a8db73
Add cr_await, cr_code, cr_frame and cr_running to Coroutine ( #2530 )
2018-10-21 13:56:52 +02:00
Hannes Karppila
4d86092df0
Fix return type of ast.NodeTransformer.generic_visit ( #2486 )
2018-10-19 08:50:50 +02:00
Andrew Svetlov
d43d8a2884
loop argument for set_event_loop() is optional, it can be None ( #2525 )
2018-10-18 14:24:54 +02:00