mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
Big diff: Use new "|" union syntax (#5872)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user