reformat with black

This commit is contained in:
Maxim Kurnikov
2018-07-29 23:34:58 +03:00
parent 4866354600
commit cf85607969
343 changed files with 6054 additions and 2158 deletions

View File

@@ -8,6 +8,7 @@ from io import BytesIO
from django.core.files.uploadedfile import InMemoryUploadedFile, TemporaryUploadedFile
from django.core.handlers.wsgi import WSGIRequest
from typing import Any, Dict, Optional, Union
class UploadFileException(Exception): ...
class StopUpload(UploadFileException):
@@ -27,9 +28,24 @@ class FileUploadHandler:
content_type_extra: Any = ...
request: Any = ...
def __init__(self, request: WSGIRequest = ...) -> None: ...
def handle_raw_input(self, input_data: WSGIRequest, META: Dict[str, Any], content_length: int, boundary: bytes, encoding: str = ...) -> None: ...
def handle_raw_input(
self,
input_data: WSGIRequest,
META: Dict[str, Any],
content_length: int,
boundary: bytes,
encoding: str = ...,
) -> None: ...
field_name: Any = ...
def new_file(self, field_name: str, file_name: str, content_type: str, content_length: None, charset: None = ..., content_type_extra: Dict[Any, Any] = ...) -> None: ...
def new_file(
self,
field_name: str,
file_name: str,
content_type: str,
content_length: None,
charset: None = ...,
content_type_extra: Dict[Any, Any] = ...,
) -> None: ...
def receive_data_chunk(self, raw_data: Any, start: Any) -> None: ...
def file_complete(self, file_size: Any) -> None: ...
def upload_complete(self) -> None: ...
@@ -42,7 +58,14 @@ class TemporaryFileUploadHandler(FileUploadHandler):
class MemoryFileUploadHandler(FileUploadHandler):
activated: Any = ...
def handle_raw_input(self, input_data: Union[BytesIO, WSGIRequest], META: Dict[str, Any], content_length: int, boundary: bytes, encoding: str = ...) -> None: ...
def handle_raw_input(
self,
input_data: Union[BytesIO, WSGIRequest],
META: Dict[str, Any],
content_length: int,
boundary: bytes,
encoding: str = ...,
) -> None: ...
file: Any = ...
def new_file(self, *args: Any, **kwargs: Any) -> None: ...
def receive_data_chunk(self, raw_data: bytes, start: int) -> Optional[bytes]: ...