File: exceptions.pyi

package info (click to toggle)
typeshed 0.0~git20241223.ea91db2-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 28,756 kB
  • sloc: python: 7,741; makefile: 20; sh: 18
file content (43 lines) | stat: -rw-r--r-- 1,099 bytes parent folder | download | duplicates (2)
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
import sys

if sys.version_info >= (3, 11):
    __all__ = (
        "BrokenBarrierError",
        "CancelledError",
        "InvalidStateError",
        "TimeoutError",
        "IncompleteReadError",
        "LimitOverrunError",
        "SendfileNotAvailableError",
    )
else:
    __all__ = (
        "CancelledError",
        "InvalidStateError",
        "TimeoutError",
        "IncompleteReadError",
        "LimitOverrunError",
        "SendfileNotAvailableError",
    )

class CancelledError(BaseException): ...

if sys.version_info >= (3, 11):
    from builtins import TimeoutError as TimeoutError
else:
    class TimeoutError(Exception): ...

class InvalidStateError(Exception): ...
class SendfileNotAvailableError(RuntimeError): ...

class IncompleteReadError(EOFError):
    expected: int | None
    partial: bytes
    def __init__(self, partial: bytes, expected: int | None) -> None: ...

class LimitOverrunError(Exception):
    consumed: int
    def __init__(self, message: str, consumed: int) -> None: ...

if sys.version_info >= (3, 11):
    class BrokenBarrierError(RuntimeError): ...