Skip to content

Commit d9d550e

Browse files
committed
Fix overload-cannot-match error caused by python/mypy#15683
1 parent e1c98d4 commit d9d550e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

stdlib/configparser.pyi

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import sys
2-
from _typeshed import GenericPath, MaybeNone, StrOrBytesPath, SupportsWrite
2+
from _typeshed import BytesPath, GenericPath, MaybeNone, StrOrBytesPath, StrPath, SupportsWrite
33
from collections.abc import Callable, ItemsView, Iterable, Iterator, Mapping, MutableMapping, Sequence
44
from re import Pattern
55
from typing import Any, AnyStr, ClassVar, Final, Literal, TypeVar, overload, type_check_only
@@ -272,7 +272,9 @@ class RawConfigParser(_Parser):
272272
@overload
273273
def read(self, filenames: GenericPath[AnyStr], encoding: str | None = None) -> list[AnyStr]: ...
274274
@overload
275-
def read(self, filenames: Iterable[GenericPath[AnyStr]], encoding: str | None = None) -> list[AnyStr]: ...
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]: ...
276278
@overload
277279
def read(self, filenames: Iterable[StrOrBytesPath], encoding: str | None = None) -> list[str | bytes]: ...
278280
def read_file(self, f: Iterable[str], source: str | None = None) -> None: ...

0 commit comments

Comments
 (0)