mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Remove Python 3.7 branches (#11238)
This commit is contained in:
@@ -24,16 +24,12 @@ from _csv import (
|
||||
|
||||
if sys.version_info >= (3, 12):
|
||||
from _csv import QUOTE_NOTNULL as QUOTE_NOTNULL, QUOTE_STRINGS as QUOTE_STRINGS
|
||||
|
||||
from _typeshed import SupportsWrite
|
||||
from collections.abc import Collection, Iterable, Iterator, Mapping, Sequence
|
||||
from typing import Any, Generic, TypeVar, overload
|
||||
from typing_extensions import Literal, Self
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
from builtins import dict as _DictReadMapping
|
||||
else:
|
||||
from collections import OrderedDict as _DictReadMapping
|
||||
|
||||
if sys.version_info >= (3, 12):
|
||||
from types import GenericAlias
|
||||
|
||||
@@ -69,7 +65,7 @@ class excel(Dialect): ...
|
||||
class excel_tab(excel): ...
|
||||
class unix_dialect(Dialect): ...
|
||||
|
||||
class DictReader(Iterator[_DictReadMapping[_T | Any, str | Any]], Generic[_T]):
|
||||
class DictReader(Iterator[dict[_T | Any, str | Any]], Generic[_T]):
|
||||
fieldnames: Sequence[_T] | None
|
||||
restkey: _T | None
|
||||
restval: str | Any | None
|
||||
@@ -113,7 +109,7 @@ class DictReader(Iterator[_DictReadMapping[_T | Any, str | Any]], Generic[_T]):
|
||||
strict: bool = False,
|
||||
) -> None: ...
|
||||
def __iter__(self) -> Self: ...
|
||||
def __next__(self) -> _DictReadMapping[_T | Any, str | Any]: ...
|
||||
def __next__(self) -> dict[_T | Any, str | Any]: ...
|
||||
if sys.version_info >= (3, 12):
|
||||
def __class_getitem__(cls, item: Any) -> GenericAlias: ...
|
||||
|
||||
@@ -139,11 +135,7 @@ class DictWriter(Generic[_T]):
|
||||
quoting: _QuotingType = 0,
|
||||
strict: bool = False,
|
||||
) -> None: ...
|
||||
if sys.version_info >= (3, 8):
|
||||
def writeheader(self) -> Any: ...
|
||||
else:
|
||||
def writeheader(self) -> None: ...
|
||||
|
||||
def writeheader(self) -> Any: ...
|
||||
def writerow(self, rowdict: Mapping[_T, Any]) -> Any: ...
|
||||
def writerows(self, rowdicts: Iterable[Mapping[_T, Any]]) -> None: ...
|
||||
if sys.version_info >= (3, 12):
|
||||
|
||||
Reference in New Issue
Block a user