Big diff: Use new "|" union syntax (#5872)

This commit is contained in:
Akuli
2021-08-08 12:05:21 +03:00
committed by GitHub
parent b9adb7a874
commit ee487304d7
578 changed files with 8080 additions and 8966 deletions

View File

@@ -3,12 +3,12 @@
# See the README.md file in this directory for more information.
from sys import _OptExcInfo
from typing import Any, Callable, Dict, Iterable, List, Optional, Protocol, Tuple
from typing import Any, Callable, Dict, Iterable, List, Protocol, Tuple
# stable
class StartResponse(Protocol):
def __call__(
self, status: str, headers: List[Tuple[str, str]], exc_info: Optional[_OptExcInfo] = ...
self, status: str, headers: List[Tuple[str, str]], exc_info: _OptExcInfo | None = ...
) -> Callable[[bytes], Any]: ...
WSGIEnvironment = Dict[str, Any] # stable

View File

@@ -1,10 +1,10 @@
# See the README.md file in this directory for more information.
from typing import Any, Optional
from typing import Any
from typing_extensions import Protocol
# As defined https://docs.python.org/3/library/xml.dom.html#domimplementation-objects
class DOMImplementation(Protocol):
def hasFeature(self, feature: str, version: Optional[str]) -> bool: ...
def createDocument(self, namespaceUri: str, qualifiedName: str, doctype: Optional[Any]) -> Any: ...
def hasFeature(self, feature: str, version: str | None) -> bool: ...
def createDocument(self, namespaceUri: str, qualifiedName: str, doctype: Any | None) -> Any: ...
def createDocumentType(self, qualifiedName: str, publicId: str, systemId: str) -> Any: ...