mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 04:34:28 +08:00
remove unneeded Iterable base class from CookieJar (#12812)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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]: ...
|
||||
|
||||
Reference in New Issue
Block a user