mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-13 15:31:55 +08:00
improved version
This commit is contained in:
@@ -10,6 +10,7 @@ from django.db.backends.sqlite3.base import DatabaseWrapper
|
||||
from django.template.base import Template
|
||||
from django.template.context import Context
|
||||
from django.test.runner import DiscoverRunner
|
||||
from django.test.testcases import SimpleTestCase
|
||||
from django.utils.safestring import SafeText
|
||||
from typing import (
|
||||
Any,
|
||||
@@ -128,7 +129,10 @@ class TestContextDecorator:
|
||||
def __exit__(self, exc_type: None, exc_value: None, traceback: None) -> None: ...
|
||||
def __init__(self, attr_name: Optional[str] = ..., kwarg_name: Optional[str] = ...) -> None: ...
|
||||
def decorate_callable(self, func: Callable) -> Callable: ...
|
||||
def decorate_class(self, cls: Any) -> Any: ...
|
||||
def decorate_class(
|
||||
self,
|
||||
cls: Type[SimpleTestCase]
|
||||
) -> Type[SimpleTestCase]: ...
|
||||
|
||||
|
||||
class ignore_warnings:
|
||||
@@ -146,7 +150,7 @@ class isolate_apps:
|
||||
class modify_settings:
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
def enable(self) -> None: ...
|
||||
def save_options(self, test_func: Any) -> None: ...
|
||||
def save_options(self, test_func: Type[SimpleTestCase]) -> None: ...
|
||||
|
||||
|
||||
class override_script_prefix:
|
||||
@@ -157,10 +161,16 @@ class override_script_prefix:
|
||||
|
||||
class override_settings:
|
||||
def __init__(self, **kwargs) -> None: ...
|
||||
def decorate_class(self, cls: Any) -> Any: ...
|
||||
def decorate_class(
|
||||
self,
|
||||
cls: Type[Union[SimpleTestCase, LoggingCaptureMixin]]
|
||||
) -> Type[Union[SimpleTestCase, LoggingCaptureMixin]]: ...
|
||||
def disable(self) -> None: ...
|
||||
def enable(self) -> None: ...
|
||||
def save_options(self, test_func: Any) -> None: ...
|
||||
def save_options(
|
||||
self,
|
||||
test_func: Type[Union[SimpleTestCase, LoggingCaptureMixin]]
|
||||
) -> None: ...
|
||||
|
||||
|
||||
class override_system_checks:
|
||||
|
||||
Reference in New Issue
Block a user