mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-19 02:15:59 +08:00
move most of the generated files
This commit is contained in:
1
django-stubs/dispatch/__init__.pyi
Normal file
1
django-stubs/dispatch/__init__.pyi
Normal file
@@ -0,0 +1 @@
|
||||
from django.dispatch.dispatcher import Signal as Signal, receiver as receiver
|
||||
33
django-stubs/dispatch/dispatcher.pyi
Normal file
33
django-stubs/dispatch/dispatcher.pyi
Normal file
@@ -0,0 +1,33 @@
|
||||
from typing import Any, Callable, List, Optional, Tuple, Type, Union
|
||||
|
||||
from django.apps.config import AppConfig
|
||||
from django.db.models.base import Model
|
||||
|
||||
NONE_ID: Any
|
||||
NO_RECEIVERS: Any
|
||||
|
||||
class Signal:
|
||||
receivers: Any = ...
|
||||
providing_args: Any = ...
|
||||
lock: Any = ...
|
||||
use_caching: Any = ...
|
||||
sender_receivers_cache: Any = ...
|
||||
def __init__(self, providing_args: List[str] = ..., use_caching: bool = ...) -> None: ...
|
||||
def connect(
|
||||
self,
|
||||
receiver: Any,
|
||||
sender: Optional[Union[Type[Model], AppConfig]] = ...,
|
||||
weak: bool = ...,
|
||||
dispatch_uid: Optional[str] = ...,
|
||||
) -> None: ...
|
||||
def disconnect(
|
||||
self,
|
||||
receiver: Optional[Callable] = ...,
|
||||
sender: Optional[Union[Type[Model], AppConfig]] = ...,
|
||||
dispatch_uid: Optional[str] = ...,
|
||||
) -> bool: ...
|
||||
def has_listeners(self, sender: Any = ...) -> bool: ...
|
||||
def send(self, sender: Any, **named: Any) -> List[Tuple[Callable, Optional[str]]]: ...
|
||||
def send_robust(self, sender: Any, **named: Any) -> List[Tuple[Callable, Union[ValueError, str]]]: ...
|
||||
|
||||
def receiver(signal: Union[List[Signal], Signal], **kwargs: Any) -> Callable: ...
|
||||
Reference in New Issue
Block a user