-
Notifications
You must be signed in to change notification settings - Fork 85
/
trait_type.pyi
67 lines (39 loc) · 1.83 KB
/
trait_type.pyi
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# (C) Copyright 2020-2022 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in LICENSE.txt and may be redistributed only under
# the conditions described in the aforementioned license. The license
# is also available online at http://www.enthought.com/licenses/BSD.txt
#
# Thanks for using Enthought open source!
from typing import Any, Dict, Generic, Optional, Tuple, TypeVar
from .base_trait_handler import BaseTraitHandler as BaseTraitHandler
trait_types: Dict[str, int]
_Accepts = TypeVar('_Accepts')
_Stores = TypeVar('_Stores')
class _TraitMixin(Generic[_Accepts, _Stores]):
def __call__(self, *args, **kwagrs) -> _TraitMixin: ...
def __get__(self, object: Any, type: Any) -> _Stores: ...
def __set__(self, object: Any, value: _Accepts) -> None: ...
_Trait = _TraitMixin()
class _TraitType(BaseTraitHandler, Generic[_Accepts, _Stores]):
default_value: _Stores = ...
metadata: Dict[str, Any] = ...
def __init__(self, default_value: _Stores = ...,
**metadata: Any) -> None: ...
def init(self) -> None: ...
def get_default_value(self) -> Tuple[int, _Stores]: ...
def clone(self, default_value: _Stores = ...,
**metadata: Any) -> 'TraitType': ...
def get_value(self, object: Any, name: str,
trait: Optional[Any] = ...) -> _Stores: ...
def set_value(self, object: Any, name: str, value: _Accepts) -> None: ...
def __call__(self, *args: Any, **kw: Any): ...
def as_ctrait(self): ...
@classmethod
def instantiate_and_get_ctrait(cls): ...
def __getattr__(self, name: Any): ...
def __get__(self, object: Any, type: Any) -> _Stores: ...
def __set__(self, object: Any, value: _Accepts) -> None: ...
TraitType = _TraitType[Any, Any]