File: states.pyi

package info (click to toggle)
python-transitions 0.9.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,728 kB
  • sloc: python: 8,765; makefile: 10; sh: 7
file content (41 lines) | stat: -rw-r--r-- 1,468 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
from ..core import State, EventData, Callback, CallbacksArg

from enum import Enum
from logging import Logger
from threading import Timer
from typing import List, Union, Any, Dict, Optional, Type

_LOGGER: Logger

class Tags(State):
    tags: Logger
    def __init__(self, name: Union[str, Enum], on_enter: CallbacksArg = ..., on_exit: CallbacksArg = ...,
                 ignore_invalid_triggers: bool = ..., final: bool = ..., tags: Union[List[str], str, None] = ...) -> None : ...
class Error(Tags):
    pass

class Timeout(State):
    dynamic_methods: List[str]
    timeout: float
    _on_timeout: Optional[List[Callback]]
    runner: Dict[int, Timer]
    def __init__(self, *args: List[Any], **kwargs: Dict[str, Any]) -> None: ...
    def enter(self, event_data: EventData) -> None: ...
    def exit(self, event_data: EventData) -> None: ...
    def _process_timeout(self, event_data: EventData) -> None: ...
    @property
    def on_timeout(self) -> List[Callback]: ...
    @on_timeout.setter
    def on_timeout(self, value: Union[Callback, List[Callback]]) -> None: ...

class Volatile(State):
    volatile_cls: Any
    volatile_hook: str
    initialized: bool
    def __init__(self, *args: List[Any], **kwargs: Dict[str, Any]) -> None: ...
    def enter(self, event_data: EventData) -> None: ...
    def exit(self, event_data: EventData) -> None: ...

def add_state_features(*args: Union[Type[State], List[Type[State]]]) -> Any: ...

class VolatileObject: ...