mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-28 06:36:54 +08:00
Use OSError instead of IOError (#9683)
This commit is contained in:
@@ -113,7 +113,7 @@ else:
|
||||
SIGXCPU: Signals
|
||||
SIGXFSZ: Signals
|
||||
|
||||
class ItimerError(IOError): ...
|
||||
class ItimerError(OSError): ...
|
||||
ITIMER_PROF: int
|
||||
ITIMER_REAL: int
|
||||
ITIMER_VIRTUAL: int
|
||||
|
||||
@@ -4,7 +4,7 @@ from urllib.response import addinfourl
|
||||
|
||||
__all__ = ["URLError", "HTTPError", "ContentTooShortError"]
|
||||
|
||||
class URLError(IOError):
|
||||
class URLError(OSError):
|
||||
reason: str | BaseException
|
||||
def __init__(self, reason: str | BaseException, filename: str | None = None) -> None: ...
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
__version__: str
|
||||
|
||||
class UnidentifiedImageError(IOError): ...
|
||||
class UnidentifiedImageError(OSError): ...
|
||||
|
||||
@@ -14,8 +14,8 @@ from docutils import TransformSpec
|
||||
|
||||
__docformat__: str
|
||||
|
||||
class InputError(IOError): ...
|
||||
class OutputError(IOError): ...
|
||||
class InputError(OSError): ...
|
||||
class OutputError(OSError): ...
|
||||
|
||||
def check_encoding(stream: Any, encoding: str) -> bool | None: ...
|
||||
def error_string(err: BaseException) -> str: ...
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from threading import Event
|
||||
from typing import AnyStr, Generic
|
||||
|
||||
class PipeTimeout(IOError): ...
|
||||
class PipeTimeout(OSError): ...
|
||||
|
||||
class BufferedPipe(Generic[AnyStr]):
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
@@ -2,7 +2,7 @@ from typing import Any
|
||||
|
||||
from urllib3.exceptions import HTTPError as BaseHTTPError
|
||||
|
||||
class RequestException(IOError):
|
||||
class RequestException(OSError):
|
||||
response: Any
|
||||
request: Any
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user