diff --git a/stdlib/imp.pyi b/stdlib/imp.pyi index ec09d18de..3054a4465 100644 --- a/stdlib/imp.pyi +++ b/stdlib/imp.pyi @@ -1,6 +1,7 @@ import types from _typeshed import StrPath from os import PathLike +from types import TracebackType from typing import IO, Any, Protocol from _imp import ( @@ -45,7 +46,7 @@ class _FileLike(Protocol): def read(self) -> str | bytes: ... def close(self) -> Any: ... def __enter__(self) -> Any: ... - def __exit__(self, *args: Any) -> Any: ... + def __exit__(self, typ: type[BaseException] | None, exc: BaseException | None, tb: TracebackType | None) -> Any: ... # PathLike doesn't work for the pathname argument here def load_source(name: str, pathname: str, file: _FileLike | None = ...) -> types.ModuleType: ...