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
PRAJWAL M
60000d0898
correct parse_args namespace attribute ( #2566 )
...
Closes #2366
2018-10-28 18:48:34 +01:00
PRAJWAL M
9ee458226c
Remove version guard ( #2565 )
...
isAlive() is still present in threading.py in python 2.7, 3.4, 3.5, 3.6, 3.7.
Closes #2552
2018-10-28 00:21:47 +02: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
PRAJWAL M
c0d181605e
Make backlog parameter optional in listen method ( #2553 )
2018-10-25 18:14:39 +02:00
PRAJWAL M
b33738e042
Add is_dir method to ZipInfo class ( #2554 )
2018-10-25 17:55:39 +02: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
Sebastian Rittau
680d69bd81
Update to flake8 3.6.0 ( #2547 )
...
* Update to flake8 3.6.0
* Configure line length and move to 'nice to have'
* Also update flake8-bugbear and pin flake8-pyi
2018-10-24 05:53:33 -07:00
Michael J. Sullivan
4badd35325
Allow json.dump to dump to BinaryIO again ( #2546 )
...
PR #2516 aimed to widen the accepted file argument to json.dump, but
since `IO` is invariant in its argument, it actually disallowed
passing binary files.
2018-10-23 16:13:07 -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
Sebastian Rittau
c4f4c40601
Annotate jwt.algorithms ( #2532 )
...
Cf. #1446
2018-10-23 09:32:14 -07:00
Jelle Zijlstra
63cf7f529b
fix lint error ( #2541 )
2018-10-23 14:00:26 +02:00
Sebastian Rittau
6d6894e1ef
Annotate werkzeug wrap_file() and FileWrapper ( #2519 )
...
* Add FileWrapper protocol to wsgiref.types
* Annotate werkzeug's wrap_file and FileWrapper
* Remove empty line at end of file
* Fix _Readable protocols
2018-10-23 13:43:53 +02:00
Sebastian Rittau
48fc8d6d82
Rework .travis.yml and run with Python 3.7 where possible ( #2536 )
2018-10-23 13:19:25 +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
David Zbarsky
167f72dbac
Fix typo in mmap const ( #2537 )
2018-10-22 20:02:05 -07: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
Sebastian Rittau
f07bdf418b
Fix pytype test output ( #2534 )
2018-10-22 09:14:22 +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
Michael
82d54ce57b
Update PyJWT's exceptions ( #2522 )
...
Regards jpadilla/pyjwt#316 , jpadilla/pyjwt#335 , jpadilla/pyjwt#340
2018-10-21 13:30:37 +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
Lourens Veen
703c03e4b0
Add UserString and UserList data attribute ( #2518 )
2018-10-16 10:36:17 +02:00
Daniel Li
254af0ff2a
Add stub for pathlib2.Path.__div__ ( #2507 )
2018-10-16 07:31:58 +02:00
thautwarm
e5713d2942
ImportFrom level cannot be optional ( #2517 )
2018-10-16 04:10:40 +02:00
Grzegorz Śliwiński
4ed42f899e
click.option's defined type as return type of callable ( #2505 )
2018-10-16 03:53:29 +02:00
Siva Chandra
cec2202550
Widen the type of the file argument to Python 2's json.dump. ( #2516 )
2018-10-12 15:58:46 -07:00
Rebecca Chen
ea0a0fd17e
Fix _StrType in difflib in Python 2. ( #2514 )
...
difflib functions accept unicode as well.
2018-10-12 14:39:24 +02:00
Fionn Fitzmaurice
a6b4f687e0
Set urllib.parse.urljoin url argument to optional ( #2513 )
2018-10-11 19:50:52 +02:00
Semyon Proshev
4859742087
Inherit InstanceType from object ( #2511 )
2018-10-08 14:31:21 +02:00
Siva Chandra
1b37ca4297
Make csv.reader take Iterator[Text] argument instead of Iterator[str]. ( #2508 )
2018-10-05 13:10:41 -07:00
Grzegorz Śliwiński
94485f9e4f
skip .git files from linting with flake8 ( #2506 )
2018-10-05 08:29:21 -07:00
Wim L
fafed64213
Make _NetlocResultMixinBytes derive from _NetlocResultMixinBase[bytes], not [str] ( #2503 )
2018-10-03 19:26:12 -07:00
Jelle Zijlstra
bc3f9fe1d3
fix typing.Pattern in Python 2 ( #2219 )
...
Fixes #2199
2018-10-01 20:35:13 -07:00
Manuel Vázquez Acosta
1297caa27b
Make 'datetime' a subclass of 'date'. ( #2488 )
...
Fixes #2487 .
2018-10-01 20:19:02 -07:00
Benjamin Peterson
b2a9f2e383
Add new gflags names. ( #2489 )
...
As a described in https://github.com/google/python-gflags/blob/master/absl_migration/migration_guidelines.md , gflags did a mass rename to PEP 8-style names.
2018-10-01 20:18:51 -07:00
Richard Levasseur
4122a70648
Add some private methods to unittest ( #2494 )
...
This adds a few stubs that are used by absl-py, and, without them, cause
type checker errors under Pytype:
* TestCase._formatMessage
* TestCase._testMethodName
* TestCase._getAssertEqualityFunc
* TestProgram.runTests
2018-10-01 20:18:26 -07:00
Sebastian Rittau
2d3edbd348
Slightly improve annotation of tkinter.Tk ( #2498 )
...
Closes : #1767
2018-10-01 20:15:22 -07:00
Jan Teske
94a1b09d1d
Support PathLike arguments in the logging module. ( #2500 )
...
Since Python 3.6 logging.FileHandler's filename argument can be a
PathLike object. Same for FileHandler's subclasses.
logging.basicConfig passes its filename argument to a FileHandler, so
this can be a PathLike object too.
Finally, logging.config.fileConfig passes its fname argument to
ConfigParser.read, which also takes a PathLike since version 3.6.1.
2018-10-01 20:13:37 -07:00
Sebastian Rittau
7be20fcf91
Return Any, not Union from IP parsing functions ( #2499 )
...
Closes : #2080
2018-10-01 08:48:39 -07:00
Ruben Berenguel
3814d47aff
Change json arguments in requests to Any ( #2497 )
...
Fixes #2492
2018-09-30 09:23:34 -07:00
Adam Dangoor
45a11b974e
Update parse_multipart return type to support Python 3.7 ( #2474 )
...
* Add encoding and errors parameters to cgi.parse_multipart stub.
2018-09-27 22:19:02 +02:00
Benjamin Peterson
a8cfde79c4
Use structural inference for enum34 EnumMeta. ( #2490 )
...
Fixes python/mypy#5577 .
2018-09-27 09:27:41 -07:00