95 lines
1.9 KiB
Python
95 lines
1.9 KiB
Python
# uncompyle6 version 3.9.2
|
|
# Python bytecode version base 3.7.0 (3394)
|
|
# Decompiled from: Python 3.8.19 (default, Mar 20 2024, 15:27:52)
|
|
# [Clang 14.0.6 ]
|
|
# Embedded file name: /var/user/app/device_supervisorbak/device_supervisor/lib/pyrsistent/typing.py
|
|
# Compiled at: 2024-04-18 03:12:57
|
|
# Size of source mod 2**32: 1767 bytes
|
|
"""Helpers for use with type annotation.
|
|
|
|
Use the empty classes in this module when annotating the types of Pyrsistent
|
|
objects, instead of using the actual collection class.
|
|
|
|
For example,
|
|
|
|
from pyrsistent import pvector
|
|
from pyrsistent.typing import PVector
|
|
|
|
myvector: PVector[str] = pvector(['a', 'b', 'c'])
|
|
|
|
"""
|
|
from __future__ import absolute_import
|
|
try:
|
|
from typing import Container
|
|
from typing import Hashable
|
|
from typing import Generic
|
|
from typing import Iterable
|
|
from typing import Mapping
|
|
from typing import Sequence
|
|
from typing import Sized
|
|
from typing import TypeVar
|
|
__all__ = [
|
|
'CheckedPMap',
|
|
'CheckedPSet',
|
|
'CheckedPVector',
|
|
'PBag',
|
|
'PDeque',
|
|
'PList',
|
|
'PMap',
|
|
'PSet',
|
|
'PVector']
|
|
T = TypeVar("T")
|
|
KT = TypeVar("KT")
|
|
VT = TypeVar("VT")
|
|
|
|
class CheckedPMap(Mapping[(KT, VT)], Hashable):
|
|
pass
|
|
|
|
|
|
class CheckedPSet(Generic[T], Hashable):
|
|
pass
|
|
|
|
|
|
class CheckedPVector(Sequence[T], Hashable):
|
|
pass
|
|
|
|
|
|
class PBag(Container[T], Iterable[T], Sized, Hashable):
|
|
pass
|
|
|
|
|
|
class PDeque(Sequence[T], Hashable):
|
|
pass
|
|
|
|
|
|
class PList(Sequence[T], Hashable):
|
|
pass
|
|
|
|
|
|
class PMap(Mapping[(KT, VT)], Hashable):
|
|
pass
|
|
|
|
|
|
class PSet(Generic[T], Hashable):
|
|
pass
|
|
|
|
|
|
class PVector(Sequence[T], Hashable):
|
|
pass
|
|
|
|
|
|
class PVectorEvolver(Generic[T]):
|
|
pass
|
|
|
|
|
|
class PMapEvolver(Generic[(KT, VT)]):
|
|
pass
|
|
|
|
|
|
class PSetEvolver(Generic[T]):
|
|
pass
|
|
|
|
|
|
except ImportError:
|
|
pass
|