Files
django-stubs/django/core/management/base.pyi
Maxim Kurnikov a9f215bf64 initial commit
2018-07-29 18:12:23 +03:00

76 lines
2.1 KiB
Python

from io import (
StringIO,
TextIOWrapper,
)
from argparse import (
Action,
Namespace,
)
from django.core.checks.messages import Warning
from typing import (
Any,
Callable,
List,
Optional,
Tuple,
Union,
)
def handle_default_options(options: Namespace) -> None: ...
def no_translations(handle_func: Callable) -> Callable: ...
class BaseCommand:
def __init__(
self,
stdout: Optional[StringIO] = ...,
stderr: None = ...,
no_color: bool = ...
) -> None: ...
def _run_checks(self, **kwargs) -> List[Warning]: ...
def add_arguments(self, parser: CommandParser) -> None: ...
def check(
self,
app_configs: None = ...,
tags: None = ...,
display_num_errors: bool = ...,
include_deployment_checks: bool = ...,
fail_level: int = ...
) -> None: ...
def check_migrations(self) -> None: ...
def create_parser(self, prog_name: str, subcommand: str) -> CommandParser: ...
def execute(self, *args, **options) -> Optional[Union[str, Tuple]]: ...
def get_version(self) -> str: ...
def print_help(self, prog_name: str, subcommand: str) -> None: ...
def run_from_argv(self, argv: List[str]): ...
class CommandParser:
def __init__(self, **kwargs) -> None: ...
def error(self, message: str): ...
def parse_args(self, args: List[str] = ..., namespace: None = ...) -> Namespace: ...
class DjangoHelpFormatter:
def _reordered_actions(self, actions: List[Action]) -> List[Action]: ...
def add_usage(self, usage: None, actions: List[Any], *args, **kwargs) -> None: ...
class LabelCommand:
def add_arguments(self, parser: CommandParser) -> None: ...
def handle(self, *labels, **options) -> str: ...
class OutputWrapper:
def __getattr__(self, name: str) -> Callable: ...
def __init__(
self,
out: Union[StringIO, TextIOWrapper],
style_func: Optional[Callable] = ...,
ending: str = ...
) -> None: ...
def isatty(self) -> bool: ...
def write(self, msg: str, style_func: Optional[Callable] = ..., ending: Optional[str] = ...) -> None: ...