Use typing_extensions.Self in the stdlib (#9694)

This commit is contained in:
Alex Waygood
2023-02-09 09:12:13 +00:00
committed by GitHub
parent 10086c06a1
commit 9ed39d8796
98 changed files with 627 additions and 654 deletions

View File

@@ -1,7 +1,7 @@
import sys
import xml.dom
from _typeshed import Incomplete, ReadableBuffer, Self, SupportsRead, SupportsWrite
from typing_extensions import Literal
from _typeshed import Incomplete, ReadableBuffer, SupportsRead, SupportsWrite
from typing_extensions import Literal, Self
from xml.dom.xmlbuilder import DocumentLS, DOMImplementationLS
from xml.sax.xmlreader import XMLReader
@@ -46,7 +46,7 @@ class Node(xml.dom.Node):
def setUserData(self, key, data, handler): ...
childNodes: Incomplete
def unlink(self) -> None: ...
def __enter__(self: Self) -> Self: ...
def __enter__(self) -> Self: ...
def __exit__(self, et, ev, tb) -> None: ...
class DocumentFragment(Node):
@@ -269,7 +269,7 @@ class DOMImplementation(DOMImplementationLS):
def hasFeature(self, feature: str, version: str | None) -> bool: ...
def createDocument(self, namespaceURI: str | None, qualifiedName: str | None, doctype: DocumentType | None) -> Document: ...
def createDocumentType(self, qualifiedName: str | None, publicId: str, systemId: str) -> DocumentType: ...
def getInterface(self: Self, feature: str) -> Self | None: ...
def getInterface(self, feature: str) -> Self | None: ...
class ElementInfo:
tagName: Incomplete