mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-16 00:37:11 +08:00
fourth iteration
This commit is contained in:
@@ -1,12 +1,7 @@
|
||||
from typing import Any, Callable, List, Optional, Tuple, Type, Union
|
||||
|
||||
from django.apps.config import AppConfig
|
||||
from django.conf import Settings, UserSettingsHolder
|
||||
from django.core.handlers.wsgi import WSGIHandler
|
||||
from django.db.backends.sqlite3.base import DatabaseWrapper
|
||||
from django.db.models.base import Model
|
||||
from django.template.base import Template
|
||||
from django.test.client import ClientHandler
|
||||
from django.test.testcases import SimpleTestCase
|
||||
|
||||
NONE_ID: Any
|
||||
@@ -24,46 +19,20 @@ class Signal:
|
||||
def connect(
|
||||
self,
|
||||
receiver: Any,
|
||||
sender: Optional[
|
||||
Union[Type[Union[Any, Model]], AppConfig, SimpleTestCase]
|
||||
] = ...,
|
||||
sender: Optional[Union[Type[Model], AppConfig, SimpleTestCase]] = ...,
|
||||
weak: bool = ...,
|
||||
dispatch_uid: Optional[str] = ...,
|
||||
) -> None: ...
|
||||
def disconnect(
|
||||
self,
|
||||
receiver: Optional[Callable] = ...,
|
||||
sender: Optional[
|
||||
Union[Type[Union[Any, Model]], AppConfig, SimpleTestCase]
|
||||
] = ...,
|
||||
sender: Optional[Union[Type[Model], AppConfig, SimpleTestCase]] = ...,
|
||||
dispatch_uid: Optional[str] = ...,
|
||||
) -> bool: ...
|
||||
def has_listeners(self, sender: Any = ...) -> bool: ...
|
||||
def send(
|
||||
self,
|
||||
sender: Optional[
|
||||
Union[
|
||||
Type[
|
||||
Optional[
|
||||
Union[
|
||||
Settings,
|
||||
UserSettingsHolder,
|
||||
WSGIHandler,
|
||||
DatabaseWrapper,
|
||||
Model,
|
||||
ClientHandler,
|
||||
SimpleTestCase,
|
||||
]
|
||||
]
|
||||
],
|
||||
AppConfig,
|
||||
Template,
|
||||
SimpleTestCase,
|
||||
str,
|
||||
]
|
||||
],
|
||||
**named: Any
|
||||
) -> List[Tuple[Optional[str], Optional[str]]]: ...
|
||||
self, sender: Any, **named: Any
|
||||
) -> Union[List[Tuple[None, None]], List[Tuple[str, str]]]: ...
|
||||
def send_robust(
|
||||
self, sender: SimpleTestCase, **named: Any
|
||||
) -> List[Tuple[Callable, Union[ValueError, str]]]: ...
|
||||
|
||||
Reference in New Issue
Block a user