Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
"""
from warnings import warn
from weakref import WeakValueDictionary
from blinker._utilities import (
WeakTypes,
contextmanager,
defaultdict,
hashable_identity,
lazy_property,
reference,
symbol,
)
ANY = symbol('ANY')
ANY.__doc__ = 'Token for "any sender".'
ANY_ID = 0
class Signal(object):
"""A notification emitter."""
#: An :obj:`ANY` convenience synonym, allows ``Signal.ANY``
#: without an additional import.
ANY = ANY
@lazy_property
def receiver_connected(self):
"""Emitted after each :meth:`connect`.
The signal sender is the signal instance, and the :meth:`connect`
"""
from warnings import warn
from weakref import WeakValueDictionary
from blinker._utilities import (
WeakTypes,
contextmanager,
defaultdict,
hashable_identity,
lazy_property,
reference,
symbol,
)
ANY = symbol('ANY')
ANY.__doc__ = 'Token for "any sender".'
ANY_ID = 0
class Signal(object):
"""A notification emitter."""
#: An :obj:`ANY` convenience synonym, allows ``Signal.ANY``
#: without an additional import.
ANY = ANY
@lazy_property
def receiver_connected(self):
"""Emitted after each :meth:`connect`.
The signal sender is the signal instance, and the :meth:`connect`
standard_library.install_aliases()
from builtins import *
from warnings import warn
from weakref import WeakValueDictionary
from blinker._utilities import (
WeakTypes,
contextmanager,
defaultdict,
hashable_identity,
reference,
symbol,
)
ANY = symbol('ANY')
ANY.__doc__ = 'Token for "any sender".'
ANY_ID = 0
class Signal(object):
"""A notification emitter."""
#: An :obj:`ANY` convenience synonym, allows ``Signal.ANY``
#: without an additional import.
ANY = ANY
def __init__(self, doc=None):
"""
:param doc: optional. If provided, will be assigned to the signal's
__doc__ attribute.
"""
from warnings import warn
from weakref import WeakValueDictionary
from blinker._utilities import (
WeakTypes,
contextmanager,
defaultdict,
hashable_identity,
lazy_property,
reference,
symbol,
)
ANY = symbol('ANY')
ANY.__doc__ = 'Token for "any sender".'
ANY_ID = 0
class Signal(object):
"""A notification emitter."""
#: An :obj:`ANY` convenience synonym, allows ``Signal.ANY``
#: without an additional import.
ANY = ANY
@lazy_property
def receiver_connected(self):
"""Emitted after each :meth:`connect`.
The signal sender is the signal instance, and the :meth:`connect`
from blinker._utilities import (
WeakTypes,
contextmanager,
defaultdict,
hashable_identity,
lazy_property,
reference,
symbol,
)
ANY = symbol('ANY')
ANY.__doc__ = 'Token for "any sender".'
ANY_ID = 0
Unspecified = symbol('Unspecified')
class Signal(object):
"""A notification emitter."""
#: An :obj:`ANY` convenience synonym, allows ``Signal.ANY``
#: without an additional import.
ANY = ANY
#: If this callable is set, will be invoked with `(receiver, sender,
#: kwargs)` for each receiver during :meth:`send` instead of invoking
#: reciever functions directly.
receiver_adapter = None
@lazy_property
def receiver_connected(self):
def __reduce__(self):
return symbol, (self.name,)
"""
from warnings import warn
from weakref import WeakValueDictionary
from blinker._utilities import (
WeakTypes,
contextmanager,
defaultdict,
hashable_identity,
lazy_property,
reference,
symbol,
)
ANY = symbol('ANY')
ANY.__doc__ = 'Token for "any sender".'
ANY_ID = 0
Unspecified = symbol('Unspecified')
class Signal(object):
"""A notification emitter."""
#: An :obj:`ANY` convenience synonym, allows ``Signal.ANY``
#: without an additional import.
ANY = ANY
#: If this callable is set, will be invoked with `(receiver, sender,
#: kwargs)` for each receiver during :meth:`send` instead of invoking
#: reciever functions directly.