mirror of
https://github.com/davidhalter/django-stubs.git
synced 2026-08-18 05:38:03 +08:00
move generated stubs to separate directory, too messty
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
from typing import Any, Dict, Optional, Type, Union
|
||||
from uuid import UUID
|
||||
|
||||
|
||||
class IntConverter:
|
||||
regex: str = ...
|
||||
def to_python(self, value: str) -> int: ...
|
||||
def to_url(self, value: Union[int, str]) -> str: ...
|
||||
|
||||
class StringConverter:
|
||||
regex: str = ...
|
||||
def to_python(self, value: str) -> str: ...
|
||||
def to_url(self, value: Union[int, str, UUID]) -> Union[int, str, UUID]: ...
|
||||
|
||||
class UUIDConverter:
|
||||
regex: str = ...
|
||||
def to_python(self, value: str) -> UUID: ...
|
||||
def to_url(self, value: Union[str, UUID]) -> str: ...
|
||||
|
||||
class SlugConverter(StringConverter):
|
||||
regex: str = ...
|
||||
|
||||
class PathConverter(StringConverter):
|
||||
regex: str = ...
|
||||
|
||||
DEFAULT_CONVERTERS: Any
|
||||
REGISTERED_CONVERTERS: Any
|
||||
|
||||
def register_converter(converter: Type[Any], type_name: str) -> None: ...
|
||||
def get_converters() -> Dict[
|
||||
str, Union[IntConverter, StringConverter, UUIDConverter]
|
||||
]: ...
|
||||
def get_converter(
|
||||
raw_converter: str
|
||||
) -> Union[IntConverter, StringConverter, UUIDConverter]: ...
|
||||
Reference in New Issue
Block a user