fourth iteration

This commit is contained in:
Maxim Kurnikov committed 2018-08-11 02:23:18 +03:00
1 parent c6bceb19f4
commit 8cc446150c
113 files changed
+2285 -9835

No files matched your search

+1 -21
View File
@@ -1,7 +1,3 @@
from http.client import HTTPResponse
from io import (BufferedRandom, BufferedReader, BufferedWriter, BytesIO,
StringIO, TextIOWrapper)
from tempfile import SpooledTemporaryFile, _TemporaryFileWrapper
from typing import Any, Iterator, Optional, Union
from django.core.files.utils import FileProxyMixin
@@ -12,23 +8,7 @@ class File(FileProxyMixin):
file: _io.BufferedReader = ...
name: str = ...
mode: str = ...
def __init__(
self,
file: Optional[
Union[
BufferedRandom,
BufferedReader,
BufferedWriter,
BytesIO,
StringIO,
TextIOWrapper,
HTTPResponse,
SpooledTemporaryFile,
_TemporaryFileWrapper,
]
],
name: Optional[str] = ...,
) -> None: ...
def __init__(self, file: Any, name: Optional[str] = ...) -> None: ...
def __bool__(self) -> bool: ...
def __len__(self) -> int: ...
def size(self) -> int: ...
+3 -14
View File
@@ -1,10 +1,9 @@
from io import BytesIO
from typing import Any, Dict, Optional, Tuple, Union
from typing import Any, Dict, Optional, Union
from django.core.files.uploadedfile import (InMemoryUploadedFile,
TemporaryUploadedFile)
from django.core.handlers.wsgi import WSGIRequest
from django.test.client import FakePayload
class UploadFileException(Exception): ...
@@ -28,12 +27,7 @@ class FileUploadHandler:
def handle_raw_input(
self,
input_data: Union[BytesIO, WSGIRequest],
META: Dict[
str,
Union[
Dict[str, str], Tuple[int, int], BytesIO, FakePayload, int, str
],
],
META: Dict[str, Any],
content_length: int,
boundary: bytes,
encoding: str = ...,
@@ -75,12 +69,7 @@ class MemoryFileUploadHandler(FileUploadHandler):
def handle_raw_input(
self,
input_data: Union[BytesIO, WSGIRequest],
META: Dict[
str,
Union[
Dict[str, str], Tuple[int, int], BytesIO, FakePayload, int, str
],
],
META: Dict[str, Any],
content_length: int,
boundary: bytes,
encoding: str = ...,