# Stubs for _pytest._code.code (Python 3)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.

from types import TracebackType
from typing import Any, Generic, List, Optional, Pattern, Tuple, Type, TypeVar, Union

_E = TypeVar("_E", bound=BaseException)

class Traceback(list):
    Entry: Any = ...
    def __init__(self, tb: Any, excinfo: Optional[Any] = ...) -> None: ...
    def cut(
        self,
        path: Optional[Any] = ...,
        lineno: Optional[Any] = ...,
        firstlineno: Optional[Any] = ...,
        excludepath: Optional[Any] = ...,
    ): ...
    def __getitem__(self, key: Any): ...
    def filter(self, fn: Any = ...): ...
    def getcrashentry(self): ...
    def recursionindex(self): ...

class ExceptionInfo(Generic[_E]):
    @classmethod
    def from_exc_info(
        cls: Any,
        exc_info: Tuple[Type[_E], _E, TracebackType],
        exprinfo: Optional[str] = ...,
    ) -> ExceptionInfo[_E]: ...
    @classmethod
    def from_current(
        cls: Any, exprinfo: Optional[str] = ...
    ) -> ExceptionInfo[BaseException]: ...
    @classmethod
    def for_later(cls: Any) -> ExceptionInfo[_E]: ...
    def fill_unfilled(self, exc_info: Tuple[Type[_E], _E, TracebackType]) -> None: ...
    @property
    def type(self) -> Type[_E]: ...
    @property
    def value(self) -> _E: ...
    @property
    def tb(self) -> TracebackType: ...
    @property
    def typename(self) -> str: ...
    @property
    def traceback(self) -> Traceback: ...
    @traceback.setter
    def traceback(self, value: Traceback) -> None: ...
    def exconly(self, tryshort: bool = ...) -> str: ...
    def errisinstance(
        self, exc: Union[Type[BaseException], Tuple[Type[BaseException], ...]]
    ) -> bool: ...
    def getrepr(
        self,
        showlocals: bool = ...,
        style: str = ...,
        abspath: bool = ...,
        tbfilter: bool = ...,
        funcargs: bool = ...,
        truncate_locals: bool = ...,
        chain: bool = ...,
    ) -> Any: ...
    def match(self, regexp: Union[str, Pattern]) -> bool: ...
    def __init__(self, excinfo: Any, striptext: Any, traceback: Any) -> None: ...
    def __ne__(self, other: Any) -> bool: ...
    def __eq__(self, other: Any) -> bool: ...
    def __lt__(self, other: Any) -> None: ...
    def __le__(self, other: Any) -> None: ...
    def __gt__(self, other: Any) -> None: ...
    def __ge__(self, other: Any) -> None: ...
