mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-15 08:17:08 +08:00
run black over stubs, add checking to travis
This commit is contained in:
@@ -4,7 +4,6 @@ from typing import Any, Callable, List, Optional, Tuple, Union
|
||||
|
||||
from django.apps.config import AppConfig
|
||||
|
||||
|
||||
class CommandError(Exception): ...
|
||||
class SystemCheckError(CommandError): ...
|
||||
|
||||
@@ -23,9 +22,7 @@ class CommandParser(ArgumentParser):
|
||||
missing_args_message: None = ...
|
||||
called_from_command_line: bool = ...
|
||||
def __init__(self, **kwargs: Any) -> None: ...
|
||||
def parse_args(
|
||||
self, args: List[str] = ..., namespace: None = ...
|
||||
) -> Namespace: ...
|
||||
def parse_args(self, args: List[str] = ..., namespace: None = ...) -> Namespace: ...
|
||||
def error(self, message: str) -> Any: ...
|
||||
|
||||
def handle_default_options(options: Namespace) -> None: ...
|
||||
@@ -33,9 +30,7 @@ def no_translations(handle_func: Callable) -> Callable: ...
|
||||
|
||||
class DjangoHelpFormatter(HelpFormatter):
|
||||
show_last: Any = ...
|
||||
def add_usage(
|
||||
self, usage: None, actions: List[Any], *args: Any, **kwargs: Any
|
||||
) -> None: ...
|
||||
def add_usage(self, usage: None, actions: List[Any], *args: Any, **kwargs: Any) -> None: ...
|
||||
def add_arguments(self, actions: List[Any]) -> None: ...
|
||||
|
||||
class OutputWrapper(TextIOBase):
|
||||
@@ -45,20 +40,10 @@ class OutputWrapper(TextIOBase):
|
||||
def style_func(self, style_func: Any): ...
|
||||
style_func: Any = ...
|
||||
ending: str = ...
|
||||
def __init__(
|
||||
self,
|
||||
out: Union[StringIO, TextIOWrapper],
|
||||
style_func: Optional[Callable] = ...,
|
||||
ending: str = ...,
|
||||
) -> None: ...
|
||||
def __init__(self, out: Union[StringIO, TextIOWrapper], style_func: Optional[Callable] = ..., ending: str = ...) -> None: ...
|
||||
def __getattr__(self, name: str) -> Callable: ...
|
||||
def isatty(self) -> bool: ...
|
||||
def write(
|
||||
self,
|
||||
msg: str,
|
||||
style_func: Optional[Callable] = ...,
|
||||
ending: Optional[str] = ...,
|
||||
) -> None: ...
|
||||
def write(self, msg: str, style_func: Optional[Callable] = ..., ending: Optional[str] = ...) -> None: ...
|
||||
|
||||
class BaseCommand:
|
||||
help: str = ...
|
||||
@@ -70,22 +55,13 @@ class BaseCommand:
|
||||
stdout: django.core.management.base.OutputWrapper = ...
|
||||
stderr: django.core.management.base.OutputWrapper = ...
|
||||
style: django.core.management.color.Style = ...
|
||||
def __init__(
|
||||
self,
|
||||
stdout: Optional[StringIO] = ...,
|
||||
stderr: Optional[StringIO] = ...,
|
||||
no_color: bool = ...,
|
||||
) -> None: ...
|
||||
def __init__(self, stdout: Optional[StringIO] = ..., stderr: Optional[StringIO] = ..., no_color: bool = ...) -> None: ...
|
||||
def get_version(self) -> str: ...
|
||||
def create_parser(
|
||||
self, prog_name: str, subcommand: str
|
||||
) -> CommandParser: ...
|
||||
def create_parser(self, prog_name: str, subcommand: str) -> CommandParser: ...
|
||||
def add_arguments(self, parser: CommandParser) -> None: ...
|
||||
def print_help(self, prog_name: str, subcommand: str) -> None: ...
|
||||
def run_from_argv(self, argv: List[str]) -> None: ...
|
||||
def execute(
|
||||
self, *args: Any, **options: Any
|
||||
) -> Optional[Union[Tuple, str]]: ...
|
||||
def execute(self, *args: Any, **options: Any) -> Optional[Union[Tuple, str]]: ...
|
||||
def check(
|
||||
self,
|
||||
app_configs: Optional[List[AppConfig]] = ...,
|
||||
|
||||
Reference in New Issue
Block a user