remove unneeded Iterable base class from CookieJar (#12812)

This commit is contained in:
Stephen Morton
2024-10-15 10:47:56 -07:00
committed by GitHub
parent a871efd90c
commit f08d769f7c
2 changed files with 3 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
import sys
from _typeshed import StrPath
from collections.abc import Iterable, Iterator, Sequence
from collections.abc import Iterator, Sequence
from http.client import HTTPResponse
from re import Pattern
from typing import ClassVar, TypeVar, overload
@@ -21,7 +21,7 @@ _T = TypeVar("_T")
class LoadError(OSError): ...
class CookieJar(Iterable[Cookie]):
class CookieJar:
non_word_re: ClassVar[Pattern[str]] # undocumented
quote_re: ClassVar[Pattern[str]] # undocumented
strict_domain_re: ClassVar[Pattern[str]] # undocumented

View File

@@ -35,7 +35,7 @@ def remove_cookie_by_name(cookiejar, name, domain=None, path=None): ...
class CookieConflictError(RuntimeError): ...
class RequestsCookieJar(CookieJar, MutableMapping[str, str]): # pyright: ignore[reportGeneralTypeIssues]
class RequestsCookieJar(CookieJar, MutableMapping[str, str]): # type: ignore[misc] # conflicting __iter__ in the base classes
def get(self, name: str, default: str | None = None, domain: str | None = None, path: str | None = None) -> str | None: ... # type: ignore[override]
def set(self, name: str, value: str | Morsel[dict[str, str]], **kwargs) -> Cookie | None: ...
def iterkeys(self) -> Iterator[str]: ...