mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-20 10:51:16 +08:00
merge with stubgen output
This commit is contained in:
@@ -1,57 +1,51 @@
|
||||
# Stubs for django.core.files.uploadhandler (Python 3.6)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any, Optional
|
||||
|
||||
from io import BytesIO
|
||||
from django.core.files.uploadedfile import (
|
||||
InMemoryUploadedFile,
|
||||
TemporaryUploadedFile,
|
||||
)
|
||||
from django.core.files.uploadedfile import InMemoryUploadedFile, TemporaryUploadedFile
|
||||
from django.core.handlers.wsgi import WSGIRequest
|
||||
from typing import (
|
||||
Any,
|
||||
Dict,
|
||||
Optional,
|
||||
Union,
|
||||
)
|
||||
from typing import Any, Dict, Optional, Union
|
||||
class UploadFileException(Exception): ...
|
||||
|
||||
class StopUpload(UploadFileException):
|
||||
connection_reset: Any = ...
|
||||
def __init__(self, connection_reset: bool = ...) -> None: ...
|
||||
def __str__(self): ...
|
||||
|
||||
def load_handler(path: str, *args, **kwargs) -> FileUploadHandler: ...
|
||||
|
||||
class SkipFile(UploadFileException): ...
|
||||
class StopFutureHandlers(UploadFileException): ...
|
||||
|
||||
class FileUploadHandler:
|
||||
chunk_size: Any = ...
|
||||
file_name: Any = ...
|
||||
content_type: Any = ...
|
||||
content_length: Any = ...
|
||||
charset: Any = ...
|
||||
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 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 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 receive_data_chunk(self, raw_data: Any, start: Any) -> None: ...
|
||||
def file_complete(self, file_size: Any) -> None: ...
|
||||
def upload_complete(self) -> None: ...
|
||||
|
||||
|
||||
class MemoryFileUploadHandler:
|
||||
def file_complete(self, file_size: int) -> Optional[InMemoryUploadedFile]: ...
|
||||
def handle_raw_input(
|
||||
self,
|
||||
input_data: Union[BytesIO, WSGIRequest],
|
||||
META: Dict[str, Any],
|
||||
content_length: int,
|
||||
boundary: bytes,
|
||||
encoding: str = ...
|
||||
) -> None: ...
|
||||
def new_file(self, *args, **kwargs) -> None: ...
|
||||
def receive_data_chunk(self, raw_data: bytes, start: int) -> Optional[bytes]: ...
|
||||
|
||||
|
||||
class TemporaryFileUploadHandler:
|
||||
class TemporaryFileUploadHandler(FileUploadHandler):
|
||||
file: Any = ...
|
||||
def new_file(self, *args: Any, **kwargs: Any) -> None: ...
|
||||
def receive_data_chunk(self, raw_data: bytes, start: int) -> None: ...
|
||||
def file_complete(self, file_size: int) -> TemporaryUploadedFile: ...
|
||||
def new_file(self, *args, **kwargs) -> None: ...
|
||||
def receive_data_chunk(self, raw_data: bytes, start: int) -> None: ...
|
||||
|
||||
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: ...
|
||||
file: Any = ...
|
||||
def new_file(self, *args: Any, **kwargs: Any) -> None: ...
|
||||
def receive_data_chunk(self, raw_data: bytes, start: int) -> Optional[bytes]: ...
|
||||
def file_complete(self, file_size: int) -> Optional[InMemoryUploadedFile]: ...
|
||||
|
||||
def load_handler(path: str, *args: Any, **kwargs: Any) -> FileUploadHandler: ...
|
||||
|
||||
Reference in New Issue
Block a user