Commit Graph

34 Commits

Author SHA1 Message Date
Jelle Zijlstra
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
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
Matthias Kramm
ac0b809bf5 tweak files to fix pytype parsing errors (#1325)
* Don't use "\" to join lines
2017-05-26 08:45:52 -07:00
Jelle Zijlstra
1d6e3f492e Fix incorrect usage of AnyStr (#1215)
* Fix incorrect usage of AnyStr

- sqlite3 was using Union[bytes, AnyStr], which doesn't make sense
- The urllib functions I changed accept either bytes or str for their "safe"
  argument
- Also added supports for PathLike to pstats
- Remove some unused imports of AnyStr

* pstats: python 2 accepts unicode
2017-04-27 08:47:59 -07:00
Nathan Henrie
abb7e49089 HTTPPasswordMgrWithDefaultRealm inherits from HTTPPasswordMgr (#1082)
ee51327a23/Lib/urllib/request.py (L900)
2017-03-23 10:48:22 -07:00
David Wetterau
50327f00ee Add types for parse_qs and parse_qsl when taking bytes as input (#1020) 2017-03-18 14:52:30 -07:00
Hong Minhee
aa54fc1958 Add missing attribs to urllib.response.addinfourl (#968) 2017-03-07 16:38:52 -08:00
David Euresti
91ff50ad7a Fix AbstractDigestAuthHandler to have correct types. 2017-02-22 20:29:17 -08:00
David Euresti
6eca1a04da Some ssl fixes (#919)
Fix return of wrap_socket.
Add read, write, pending to SSLSocket
Fix argument to socket.setdefaulttimeout
2017-02-06 17:23:22 -08:00
Mike Patek
1a49669711 Add quote_via argument to urlencode (#897)
Fixes #873
2017-01-30 12:03:52 -08:00
Mohab Usama
534c7c1103 Fix SplitResult and ParseResult stubs (#816) 2017-01-09 08:33:14 -08:00
Madeleine Thompson
4b5e766193 allow_fragments, not allow_framgents (#812) 2017-01-05 14:59:04 -08:00
Lukasz Langa
c0c982ada5 Add missing Dict imports. 2016-12-21 01:15:26 -08:00
Lukasz Langa
68a49c2c2e Fixing flake8 E111, E114, E116, E203, E225, E262 errors 2016-12-20 01:39:18 -08:00
Lukasz Langa
6b5c6626d6 Fixing flake8 E121, E122, E123, E124, E125, E126 errors 2016-12-19 23:53:19 -08:00
Lukasz Langa
67e38b6806 Fixing flake8 E231 errors 2016-12-19 23:53:19 -08:00
Lukasz Langa
fe0e3744cc Fixing flake8 E261 errors 2016-12-19 22:09:35 -08:00
Jelle Zijlstra
ed4f9e9b0b urlencode: change parameters to Any instead of AnyStr (#715)
The implementation of this function calls str() on all arguments, so it accepts
any object (https://hg.python.org/cpython/file/3.5/Lib/urllib/parse.py#l801).

This was discussed on the mypy gitter chat.
2016-12-01 11:38:23 +00:00
rymdhund
eb90eddd8f Fix urllib.parse.urlencode signature (#702)
Fixes #700
2016-11-24 11:45:20 +00:00
Richard Eames
4f567d993b Add missing self parameters (#695)
A few methods are missing the `self` parameter in  `urllib.RobotFileParser`
2016-11-23 11:37:39 +00:00
Roy Williams
1b30761802 Small changes by @rowilla to collections.pyi and urllib/requests.pyi.
(Extracted from PR #530.)
2016-11-08 19:40:10 -08:00
Elazar Gershuni
090667c7b2 fix self in urllib (#643) 2016-10-30 15:01:46 -07:00
peterdotran
aef68f323f Added attributes for URLError and HTTPError (#494) 2016-08-23 17:55:51 -07:00
Guido van Rossum
39325bf159 Mypy now supports sys.platform and sys.version_info checks (#410) 2016-07-27 13:25:29 -07:00
Eklavya Sharma
a424eeb1f8 Fix some stubs in urllib.parse (#334)
* urllib.parse: Make return type of unquote_from_bytes str.

* urllib.parse: Reject encoding when quote is passed bytes.

encoding and errors must not be supplied to quote_plus and
quote if the first parameter is a bytes, or a TypeError is raised.
So overload quote and do not put encoding and errors in the
version where bytes is the first parameter.

quote and quote_plus also allow string and safe to be of different
types.  Also allow that in the stubs.
2016-07-04 13:53:46 -07:00
Alvaro Caceres
d0ac66f5f8 Use "..." for attribute values, instead of None, [], {} 2016-06-15 14:10:04 -05:00
Valérian Rousset
2b776cfb4e complete urllib (#241) 2016-06-02 09:22:29 -07:00
Tim Abbott
9ad37b5701 Add urllib.request.proxy_bypass stubs. 2016-01-27 22:12:16 -08:00
Tim Abbott
8f3f56d07f Add some missing python 3 urllib.parse stubs. 2016-01-26 20:25:30 -08:00
Tim Abbott
9e62b7df06 Add urllib.response stub for Python 3. 2016-01-26 20:25:30 -08:00
Tim Abbott
70eb00d3f2 Fix missing urllib.error ContentTooShortError stub. 2016-01-26 20:25:30 -08:00
Tim Abbott
f036fd05f3 Add stubs for urllib.robotparser. 2016-01-26 20:25:30 -08:00
Matthias Kramm
94c9ce8fd0 Consistently use '= ...' for optional parameters. 2015-11-09 13:55:02 -08:00
Matthias Kramm
337abed05a add (overwrite with) mypy stubs, if available 2015-09-30 09:59:44 -07:00