From c1060d077eab39f27a97edbd691b5a20226c3ac0 Mon Sep 17 00:00:00 2001 From: donbarbos Date: Sat, 10 Jan 2026 23:22:05 +0400 Subject: [PATCH] [pydoc] Use StrPath for ispackage function Source: https://github.com/python/cpython/blob/aa8578dc54df2af9daa3353566359e602e5905cf/Lib/pydoc.py#L293 --- stdlib/pydoc.pyi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stdlib/pydoc.pyi b/stdlib/pydoc.pyi index 935f9420f88c..3e5cd4705633 100644 --- a/stdlib/pydoc.pyi +++ b/stdlib/pydoc.pyi @@ -1,5 +1,5 @@ import sys -from _typeshed import OptExcInfo, SupportsWrite, Unused +from _typeshed import OptExcInfo, StrPath, SupportsWrite, Unused from abc import abstractmethod from builtins import list as _list # "list" conflicts with method name from collections.abc import Callable, Container, Mapping, MutableMapping @@ -35,10 +35,10 @@ def classify_class_attrs(object: object) -> list[tuple[str, str, type, str]]: .. if sys.version_info >= (3, 13): @deprecated("Deprecated since Python 3.13.") - def ispackage(path: str) -> bool: ... # undocumented + def ispackage(path: StrPath) -> bool: ... # undocumented else: - def ispackage(path: str) -> bool: ... # undocumented + def ispackage(path: StrPath) -> bool: ... # undocumented def source_synopsis(file: IO[AnyStr]) -> AnyStr | None: ... def synopsis(filename: str, cache: MutableMapping[str, tuple[int, str]] = {}) -> str | None: ...