mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
Use PEP 585 syntax in Python 2, protobuf & _ast stubs, where possible (#6949)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from _typeshed import SupportsGetItem, SupportsItemAccess
|
||||
from builtins import type as _type
|
||||
from typing import IO, Any, AnyStr, Iterable, Iterator, List, Mapping, Protocol
|
||||
from builtins import list as List, type as _type # aliases to avoid name clashes with `FieldStorage` attributes
|
||||
from typing import IO, Any, AnyStr, Iterable, Iterator, Mapping, Protocol
|
||||
from UserDict import UserDict
|
||||
|
||||
def parse(
|
||||
@@ -8,10 +8,10 @@ def parse(
|
||||
environ: SupportsItemAccess[str, str] = ...,
|
||||
keep_blank_values: bool = ...,
|
||||
strict_parsing: bool = ...,
|
||||
) -> dict[str, List[str]]: ...
|
||||
def parse_qs(qs: str, keep_blank_values: bool = ..., strict_parsing: bool = ...) -> dict[str, List[str]]: ...
|
||||
def parse_qsl(qs: str, keep_blank_values: bool = ..., strict_parsing: bool = ...) -> List[tuple[str, str]]: ...
|
||||
def parse_multipart(fp: IO[Any], pdict: SupportsGetItem[str, bytes]) -> dict[str, List[bytes]]: ...
|
||||
) -> dict[str, list[str]]: ...
|
||||
def parse_qs(qs: str, keep_blank_values: bool = ..., strict_parsing: bool = ...) -> dict[str, list[str]]: ...
|
||||
def parse_qsl(qs: str, keep_blank_values: bool = ..., strict_parsing: bool = ...) -> list[tuple[str, str]]: ...
|
||||
def parse_multipart(fp: IO[Any], pdict: SupportsGetItem[str, bytes]) -> dict[str, list[bytes]]: ...
|
||||
|
||||
class _Environ(Protocol):
|
||||
def __getitem__(self, __k: str) -> str: ...
|
||||
@@ -86,7 +86,7 @@ class FieldStorage(object):
|
||||
# In Python 2 it always returns bytes and ignores the "binary" flag
|
||||
def make_file(self, binary: Any = ...) -> IO[bytes]: ...
|
||||
|
||||
class FormContentDict(UserDict[str, List[str]]):
|
||||
class FormContentDict(UserDict[str, list[str]]):
|
||||
query_string: str
|
||||
def __init__(self, environ: Mapping[str, str] = ..., keep_blank_values: int = ..., strict_parsing: int = ...) -> None: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user