Sebastian Rittau and GitHub
51cf2f51b8
Add IO protocols to _typeshed ( #4230 )
2020-06-14 20:44:48 +02:00
Shantanu and GitHub
003fc6fa31
json: mark keyword-only args, remove deprecated arg ( #3756 )
...
* json: mark keyword-only args
Technically only true for Python 3.6+, but I didn't feel like copying
over the whole file just for Python 3.5. Let me know and I can.
* json: remove encoding from loads
This has been ignored and deprecated since 3.1 and will be removed in 3.9
It no longer even shows up in inspect.signature (in 3.8 it emits the
deprecation warning based on kwargs)
* json: update whitelists
2020-02-21 21:21:32 -08:00
Shantanu and GitHub
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
Sebastian Rittau and Jelle Zijlstra
256b3ce8ab
Remove a bunch of unused imports ( #3323 )
2019-10-08 07:59:32 -07:00
Sebastian Rittau and Jelle Zijlstra
c32e1e2280
Enable --disallow-any-generics for stubs ( #3288 )
2019-10-01 05:31:34 -07:00
Sebastian Rittau and GitHub
9ccf9356bf
Remove Python 3.4 support ( #3147 )
...
Closes #3123
2019-07-27 10:58:21 +02:00
Ville Skyttä and Sebastian Rittau
8e0d288ea4
json: require a JSONDecoder/JSONEncoder in cls ( #3138 )
2019-07-23 22:59:57 +02:00
Michael Lee and Sebastian Rittau
efb67946f8
Use variable annotations everywhere ( #2909 )
2019-04-13 10:40:52 +02:00
Sebastian Rittau and Jelle Zijlstra
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
Sebastian Rittau and Jelle Zijlstra
7ad682b0ae
Improve annotations for json.load() and loads() ( #2382 )
...
* loads() only accepts str as first argument for Python < 3.6
* Use a protocol for the first argument to load() (cf python/typing#564 )
2018-08-14 10:41:33 -07:00
Anthony Sottile and Jelle Zijlstra
2d4bb04ab3
json.load can also take IO[bytes] in py36+ ( #2188 )
2018-06-03 19:02:55 -07:00
Jelle Zijlstra and Matthias Kramm
324f1761f4
Change more defaults to ... ( #1727 )
2017-11-09 10:32:17 -08:00
Jelle Zijlstra and Matthias Kramm
54dd6ba27c
Change numerous default values to ... ( #1722 )
...
This is the convention, and some default values (e.g. strings) apparently
break pytype.
2017-11-09 06:28:40 -08:00
Martin DeMello and Matthias Kramm
d389ef3d85
Remove a few files from the pytype blacklist. ( #1628 )
...
Fixes the following issues:
* Literals rather than ... for default values
* None rather than ... for default value of typed variable
* Literals rather than ... # type for top level constants
* # Foo rather than # type: Foo
* return value of init not set to None
2017-09-27 07:57:13 -07:00
Ivan Levkivskyi and Jelle Zijlstra
d75ea88da5
Use 'as name' patter to re-export names from stubs (PEP 484) ( #1484 )
2017-07-14 21:31:53 -07:00
Guido van Rossum and Matthias Kramm
350563223f
Add Optional[] for all remaining cases of x: <type> = None ( #1424 )
...
* Final round of adding Optional[] to type of arguments with default = None
* Update Travis to use --no-implicit-optionals and clarify CONTRIBUTING.md
2017-06-21 10:50:21 -07:00
Jelle Zijlstra and Łukasz Langa
397f998368
Make json into a package to match the implementation ( #1194 )
...
This is the other half of fixing #1115 .
Also fixed the stub for JSONDecodeError and made it only exist in 3.5+.
Didn't otherwise review the exact attributes and types in the package.
2017-04-24 15:32:05 -07:00