run black over stubs, add checking to travis

This commit is contained in:
Maxim Kurnikov
2018-12-03 18:52:44 +03:00
parent d5bc7d4ab2
commit cf6119bf9b
420 changed files with 2295 additions and 8384 deletions

View File

@@ -9,7 +9,6 @@ from django.db.backends.base.base import BaseDatabaseWrapper
from django.test.testcases import SimpleTestCase, TestCase
from django.utils.datastructures import OrderedSet
class DebugSQLTextTestResult(unittest.TextTestResult):
buffer: bool
descriptions: bool
@@ -26,21 +25,15 @@ class DebugSQLTextTestResult(unittest.TextTestResult):
testsRun: int
unexpectedSuccesses: List[Any]
logger: logging.Logger = ...
def __init__(
self, stream: _WritelnDecorator, descriptions: bool, verbosity: int
) -> None: ...
def __init__(self, stream: _WritelnDecorator, descriptions: bool, verbosity: int) -> None: ...
debug_sql_stream: _io.StringIO = ...
handler: logging.StreamHandler = ...
def startTest(self, test: TestCase) -> None: ...
def stopTest(self, test: TestCase) -> None: ...
def addError(self, test: Any, err: Any) -> None: ...
def addFailure(self, test: Any, err: Any) -> None: ...
def addSubTest(
self, test: TestCase, subtest: _SubTest, err: None
) -> None: ...
def printErrorList(
self, flavour: str, errors: List[Tuple[TestCase, str, str]]
) -> None: ...
def addSubTest(self, test: TestCase, subtest: _SubTest, err: None) -> None: ...
def printErrorList(self, flavour: str, errors: List[Tuple[TestCase, str, str]]) -> None: ...
class RemoteTestResult:
events: List[Any] = ...
@@ -69,9 +62,7 @@ class RemoteTestResult:
class RemoteTestRunner:
resultclass: Any = ...
failfast: Any = ...
def __init__(
self, failfast: bool = ..., resultclass: Optional[Any] = ...
) -> None: ...
def __init__(self, failfast: bool = ..., resultclass: Optional[Any] = ...) -> None: ...
def run(self, test: Any): ...
def default_test_processes() -> int: ...
@@ -83,9 +74,7 @@ class ParallelTestSuite(unittest.TestSuite):
subsuites: Any = ...
processes: Any = ...
failfast: Any = ...
def __init__(
self, suite: Any, processes: Any, failfast: bool = ...
) -> None: ...
def __init__(self, suite: Any, processes: Any, failfast: bool = ...) -> None: ...
def run(self, result: Any): ...
class DiscoverRunner:
@@ -126,47 +115,22 @@ class DiscoverRunner:
def add_arguments(cls, parser: ArgumentParser) -> None: ...
def setup_test_environment(self, **kwargs: Any) -> None: ...
def build_suite(
self,
test_labels: Union[List[str], Tuple[str, str]] = ...,
extra_tests: Optional[List[Any]] = ...,
**kwargs: Any
self, test_labels: Union[List[str], Tuple[str, str]] = ..., extra_tests: Optional[List[Any]] = ..., **kwargs: Any
) -> TestSuite: ...
def setup_databases(
self, **kwargs: Any
) -> List[Tuple[BaseDatabaseWrapper, str, bool]]: ...
def setup_databases(self, **kwargs: Any) -> List[Tuple[BaseDatabaseWrapper, str, bool]]: ...
def get_resultclass(self) -> Optional[Type[DebugSQLTextTestResult]]: ...
def get_test_runner_kwargs(self) -> Dict[str, Optional[int]]: ...
def run_checks(self) -> None: ...
def run_suite(self, suite: TestSuite, **kwargs: Any) -> TextTestResult: ...
def teardown_databases(
self,
old_config: List[Tuple[BaseDatabaseWrapper, str, bool]],
**kwargs: Any
) -> None: ...
def teardown_databases(self, old_config: List[Tuple[BaseDatabaseWrapper, str, bool]], **kwargs: Any) -> None: ...
def teardown_test_environment(self, **kwargs: Any) -> None: ...
def suite_result(
self, suite: TestSuite, result: TextTestResult, **kwargs: Any
) -> int: ...
def run_tests(
self,
test_labels: List[str],
extra_tests: List[Any] = ...,
**kwargs: Any
) -> int: ...
def suite_result(self, suite: TestSuite, result: TextTestResult, **kwargs: Any) -> int: ...
def run_tests(self, test_labels: List[str], extra_tests: List[Any] = ..., **kwargs: Any) -> int: ...
def is_discoverable(label: str) -> bool: ...
def reorder_suite(
suite: TestSuite,
classes: Tuple[Type[TestCase], Type[SimpleTestCase]],
reverse: bool = ...,
) -> TestSuite: ...
def reorder_suite(suite: TestSuite, classes: Tuple[Type[TestCase], Type[SimpleTestCase]], reverse: bool = ...) -> TestSuite: ...
def partition_suite_by_type(
suite: TestSuite,
classes: Tuple[Type[TestCase], Type[SimpleTestCase]],
bins: List[OrderedSet],
reverse: bool = ...,
suite: TestSuite, classes: Tuple[Type[TestCase], Type[SimpleTestCase]], bins: List[OrderedSet], reverse: bool = ...
) -> None: ...
def partition_suite_by_case(suite: Any): ...
def filter_tests_by_tags(
suite: TestSuite, tags: Set[str], exclude_tags: Set[str]
) -> TestSuite: ...
def filter_tests_by_tags(suite: TestSuite, tags: Set[str], exclude_tags: Set[str]) -> TestSuite: ...