Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions stdlib/pydoc.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ from builtins import list as _list # "list" conflicts with method name
from collections.abc import Callable, Container, Mapping, MutableMapping
from reprlib import Repr
from types import MethodType, ModuleType, TracebackType
from typing import IO, Any, AnyStr, Final, NoReturn, Protocol, TypeVar, type_check_only
from typing import IO, Any, AnyStr, Final, NoReturn, Protocol, TypeVar, overload, type_check_only
from typing_extensions import TypeGuard, deprecated

__all__ = ["help"]
Expand Down Expand Up @@ -48,7 +48,14 @@ class ErrorDuringImport(Exception):
exc: type[BaseException] | None
value: BaseException | None
tb: TracebackType | None
def __init__(self, filename: str, exc_info: OptExcInfo) -> None: ...
if sys.version_info >= (3, 12):
@overload
def __init__(self, filename: str, exc_info: BaseException) -> None: ...
@overload
@deprecated("A tuple value for `exc_info` parameter is deprecated since Python 3.12. Use an exception instance.")
def __init__(self, filename: str, exc_info: OptExcInfo) -> None: ...
else:
def __init__(self, filename: str, exc_info: OptExcInfo) -> None: ...

def importfile(path: str) -> ModuleType: ...
def safeimport(path: str, forceload: bool = ..., cache: MutableMapping[str, ModuleType] = {}) -> ModuleType | None: ...
Expand Down