mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
Use PEP 585 syntax wherever possible (#6717)
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import sys
|
||||
from collections import OrderedDict
|
||||
from typing import Any, Dict
|
||||
from typing import Any
|
||||
|
||||
entitiesTrie: Any
|
||||
if sys.version_info >= (3, 7):
|
||||
attributeMap = Dict[Any, Any]
|
||||
attributeMap = dict[Any, Any]
|
||||
else:
|
||||
attributeMap = OrderedDict[Any, Any]
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, Dict
|
||||
from typing import Any
|
||||
|
||||
supports_lone_surrogates: bool
|
||||
|
||||
class MethodDispatcher(Dict[Any, Any]):
|
||||
class MethodDispatcher(dict[Any, Any]):
|
||||
default: Any
|
||||
def __init__(self, items=...) -> None: ...
|
||||
def __getitem__(self, key): ...
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from typing import Any, List
|
||||
from typing import Any
|
||||
|
||||
Marker: Any
|
||||
listElementsMap: Any
|
||||
@@ -18,7 +18,7 @@ class Node:
|
||||
def cloneNode(self) -> None: ...
|
||||
def hasContent(self) -> None: ...
|
||||
|
||||
class ActiveFormattingElements(List[Any]):
|
||||
class ActiveFormattingElements(list[Any]):
|
||||
def append(self, node) -> None: ...
|
||||
def nodesEqual(self, node1, node2): ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user