mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
Use PEP 585 syntax wherever possible (#6717)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import sys
|
||||
from typing import Any, Dict, Generic, Iterable, Mapping, TypeVar, Union, overload
|
||||
from typing import Any, Generic, Iterable, Mapping, TypeVar, Union, overload
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
from types import GenericAlias
|
||||
@@ -18,7 +18,7 @@ def _unquote(str: str) -> str: ...
|
||||
|
||||
class CookieError(Exception): ...
|
||||
|
||||
class Morsel(Dict[str, Any], Generic[_T]):
|
||||
class Morsel(dict[str, Any], Generic[_T]):
|
||||
value: str
|
||||
coded_value: _T
|
||||
key: str
|
||||
@@ -40,7 +40,7 @@ class Morsel(Dict[str, Any], Generic[_T]):
|
||||
if sys.version_info >= (3, 9):
|
||||
def __class_getitem__(cls, item: Any) -> GenericAlias: ...
|
||||
|
||||
class BaseCookie(Dict[str, Morsel[_T]], Generic[_T]):
|
||||
class BaseCookie(dict[str, Morsel[_T]], Generic[_T]):
|
||||
def __init__(self, input: _DataType | None = ...) -> None: ...
|
||||
def value_decode(self, val: str) -> _T: ...
|
||||
def value_encode(self, val: _T) -> str: ...
|
||||
|
||||
Reference in New Issue
Block a user