Make requests.Response.iter_content allow None (#1784)

* Make requests.Response.iter_content allow None

According to the docstring:
> chunk_size must be of type int or None

* Combine and alphabetize import statement
This commit is contained in:
Alan Du
2017-12-13 17:25:32 -05:00
committed by Jelle Zijlstra
parent a1e85be4c9
commit 7c4765357a

View File

@@ -1,6 +1,7 @@
# Stubs for requests.models (Python 3)
from typing import Any, List, MutableMapping, Iterator, Dict, Text
from typing import (Any, Dict, Iterator, List, MutableMapping, Optional, Text,
Union)
import datetime
import types
@@ -18,7 +19,6 @@ from . import utils
from . import compat
from . import status_codes
from typing import Optional, Union
default_hooks = hooks.default_hooks
CaseInsensitiveDict = structures.CaseInsensitiveDict
@@ -125,7 +125,7 @@ class Response:
def is_permanent_redirect(self) -> bool: ...
@property
def apparent_encoding(self) -> str: ...
def iter_content(self, chunk_size: int = ...,
def iter_content(self, chunk_size: Optional[int] = ...,
decode_unicode: bool = ...) -> Iterator[Any]: ...
def iter_lines(self, chunk_size=..., decode_unicode=..., delimiter=...): ...
@property