more fixes and improvements
This commit is contained in:
parent
d9fe295f4f
commit
5452bc5608
2 changed files with 78 additions and 31 deletions
|
|
@ -1,7 +1,7 @@
|
|||
"""
|
||||
Various helper functions, type definitions, etc.
|
||||
"""
|
||||
from .types import layer_t, annotations_t
|
||||
from .types import layer_t, annotations_t, SupportsBool
|
||||
|
||||
from .array import is_scalar
|
||||
from .autoslots import AutoSlots
|
||||
|
|
|
|||
|
|
@ -1,8 +1,13 @@
|
|||
"""
|
||||
Type definitions
|
||||
"""
|
||||
from typing import Union, Tuple, Dict, List
|
||||
from typing import Union, Tuple, Dict, List, Protocol
|
||||
|
||||
|
||||
layer_t = Union[int, Tuple[int, int], str]
|
||||
annotations_t = Dict[str, List[Union[int, float, str]]]
|
||||
|
||||
|
||||
class SupportsBool(Protocol):
|
||||
def __bool__(self) -> bool:
|
||||
...
|
||||
|
|
|
|||
Loading…
Reference in a new issue