|
1 | 1 | import sys |
2 | | -from _typeshed import MaybeNone, StrOrBytesPath, SupportsWrite |
| 2 | +from _typeshed import BytesPath, GenericPath, MaybeNone, StrOrBytesPath, StrPath, SupportsWrite |
3 | 3 | from collections.abc import Callable, ItemsView, Iterable, Iterator, Mapping, MutableMapping, Sequence |
4 | 4 | from re import Pattern |
5 | | -from typing import Any, ClassVar, Final, Literal, TypeVar, overload, type_check_only |
| 5 | +from typing import Any, AnyStr, ClassVar, Final, Literal, TypeVar, overload, type_check_only |
6 | 6 | from typing_extensions import TypeAlias, deprecated |
7 | 7 |
|
8 | 8 | if sys.version_info >= (3, 14): |
@@ -269,7 +269,14 @@ class RawConfigParser(_Parser): |
269 | 269 | def has_section(self, section: _SectionName) -> bool: ... |
270 | 270 | def options(self, section: _SectionName) -> list[str]: ... |
271 | 271 | def has_option(self, section: _SectionName, option: str) -> bool: ... |
272 | | - def read(self, filenames: StrOrBytesPath | Iterable[StrOrBytesPath], encoding: str | None = None) -> list[str]: ... |
| 272 | + @overload |
| 273 | + def read(self, filenames: GenericPath[AnyStr], encoding: str | None = None) -> list[AnyStr]: ... |
| 274 | + @overload |
| 275 | + def read(self, filenames: Iterable[StrPath], encoding: str | None = None) -> list[str]: ... |
| 276 | + @overload |
| 277 | + def read(self, filenames: Iterable[BytesPath], encoding: str | None = None) -> list[bytes]: ... |
| 278 | + @overload |
| 279 | + def read(self, filenames: Iterable[StrOrBytesPath], encoding: str | None = None) -> list[str | bytes]: ... |
273 | 280 | def read_file(self, f: Iterable[str], source: str | None = None) -> None: ... |
274 | 281 | def read_string(self, string: str, source: str = "<string>") -> None: ... |
275 | 282 | def read_dict(self, dictionary: Mapping[str, Mapping[str, Any]], source: str = "<dict>") -> None: ... |
|
0 commit comments