initial commit

This commit is contained in:
Maxim Kurnikov
2018-07-29 18:12:23 +03:00
commit a9f215bf64
311 changed files with 13433 additions and 0 deletions

41
django/urls/base.pyi Normal file
View File

@@ -0,0 +1,41 @@
from django.urls.resolvers import ResolverMatch
from typing import (
Any,
Callable,
Optional,
Type,
Union,
)
def clear_url_caches() -> None: ...
def get_script_prefix() -> str: ...
def get_urlconf(default: None = ...) -> Optional[Union[str, Type[object]]]: ...
def is_valid_path(path: str, urlconf: Optional[str] = ...) -> bool: ...
def resolve(path: str, urlconf: Optional[str] = ...) -> ResolverMatch: ...
def reverse(
viewname: Optional[Union[str, Callable]],
urlconf: Optional[str] = ...,
args: Any = ...,
kwargs: Any = ...,
current_app: Optional[str] = ...
) -> str: ...
def set_script_prefix(prefix: str) -> None: ...
def set_urlconf(urlconf_name: Any) -> None: ...
def translate_url(url: str, lang_code: str) -> str: ...

23
django/urls/conf.pyi Normal file
View File

@@ -0,0 +1,23 @@
from django.urls.resolvers import (
CheckURLMixin,
URLPattern,
URLResolver,
)
from typing import (
Any,
Optional,
Type,
Union,
)
def _path(
route: str,
view: Any,
kwargs: Any = ...,
name: Optional[str] = ...,
Pattern: Type[CheckURLMixin] = ...
) -> Union[URLPattern, URLResolver]: ...
def include(arg: Any, namespace: Optional[str] = ...) -> Any: ...

View File

@@ -0,0 +1,24 @@
from typing import (
Any,
Dict,
Union,
)
from urlpatterns.converters import DynamicConverter
from uuid import UUID
def get_converter(raw_converter: str) -> Any: ...
def get_converters(
) -> Dict[str, Union[IntConverter, StringConverter, UUIDConverter, DynamicConverter]]: ...
class IntConverter:
def to_python(self, value: str) -> int: ...
def to_url(self, value: Union[str, int]) -> str: ...
class StringConverter:
def to_python(self, value: str) -> str: ...
def to_url(self, value: Union[str, UUID, int]) -> Union[str, UUID, int]: ...