move generated stubs to separate directory, too messty

This commit is contained in:
Maxim Kurnikov
2018-11-10 17:49:18 +03:00
parent 7436d641e3
commit 96cd3ddb27
446 changed files with 58 additions and 71 deletions

View File

@@ -0,0 +1,46 @@
from datetime import datetime
from typing import Any, Dict, List, Optional, Union
from django.contrib.sites.models import Site
from django.contrib.sites.requests import RequestSite
from django.core.paginator import Paginator
from django.db.models.base import Model
from django.db.models.query import QuerySet
PING_URL: str
class SitemapNotFound(Exception): ...
def ping_google(sitemap_url: None = ..., ping_url: str = ...) -> None: ...
class Sitemap:
limit: int = ...
protocol: Any = ...
def items(self) -> List[Any]: ...
def location(self, obj: Model) -> str: ...
@property
def paginator(self) -> Paginator: ...
def get_urls(
self,
page: Union[int, str] = ...,
site: Optional[Union[Site, RequestSite]] = ...,
protocol: Optional[str] = ...,
) -> List[Dict[str, Optional[Union[datetime, Model, str]]]]: ...
class GenericSitemap(Sitemap):
priority: None = ...
changefreq: None = ...
queryset: django.db.models.query.QuerySet = ...
date_field: None = ...
protocol: None = ...
def __init__(
self,
info_dict: Dict[str, Union[datetime, QuerySet, str]],
priority: Optional[float] = ...,
changefreq: Optional[str] = ...,
protocol: Optional[str] = ...,
) -> None: ...
def items(self) -> QuerySet: ...
def lastmod(self, item: Model) -> Optional[datetime]: ...
default_app_config: str

View File

@@ -0,0 +1,12 @@
from typing import Any, Optional
from django.core.management.base import BaseCommand, CommandParser
class Command(BaseCommand):
stderr: django.core.management.base.OutputWrapper
stdout: django.core.management.base.OutputWrapper
style: django.core.management.color.Style
help: str = ...
def add_arguments(self, parser: CommandParser) -> None: ...
def handle(self, *args: Any, **options: Any) -> None: ...

View File

@@ -0,0 +1,25 @@
from collections import OrderedDict
from typing import Any, Callable, Dict, Optional, Type, Union
from django.contrib.sitemaps import GenericSitemap, Sitemap
from django.core.handlers.wsgi import WSGIRequest
from django.template.response import TemplateResponse
def x_robots_tag(func: Callable) -> Callable: ...
def index(
request: WSGIRequest,
sitemaps: Dict[str, Union[Type[Sitemap], Sitemap]],
template_name: str = ...,
content_type: str = ...,
sitemap_url_name: str = ...,
) -> TemplateResponse: ...
def sitemap(
request: WSGIRequest,
sitemaps: Union[
Dict[str, Type[Sitemap]], Dict[str, GenericSitemap], OrderedDict
],
section: Optional[str] = ...,
template_name: str = ...,
content_type: str = ...,
) -> TemplateResponse: ...