mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
make xml.etree.ElementTree.Element a Sequence (#254)
This commit is contained in:
committed by
Guido van Rossum
parent
a581397c42
commit
2b55989f7d
@@ -21,7 +21,7 @@ class ParseError(SyntaxError): ...
|
||||
|
||||
def iselement(element: 'Element') -> bool: ...
|
||||
|
||||
class Element:
|
||||
class Element(Sequence['Element']):
|
||||
tag = ... # type: _str_or_bytes
|
||||
attrib = ... # type: Dict[_str_or_bytes, _str_or_bytes]
|
||||
text = ... # type: Optional[_str_or_bytes]
|
||||
|
||||
@@ -21,7 +21,7 @@ class ParseError(SyntaxError): ...
|
||||
|
||||
def iselement(element: 'Element') -> bool: ...
|
||||
|
||||
class Element:
|
||||
class Element(Sequence['Element']):
|
||||
tag = ... # type: _str_or_bytes
|
||||
attrib = ... # type: Dict[_str_or_bytes, _str_or_bytes]
|
||||
text = ... # type: Optional[_str_or_bytes]
|
||||
|
||||
@@ -15,7 +15,7 @@ _Ss = TypeVar('_Ss', str, bytes)
|
||||
_T = TypeVar('_T')
|
||||
_str_or_bytes = Union[str, bytes]
|
||||
|
||||
class Element:
|
||||
class Element(Sequence['Element']):
|
||||
tag = ... # type: _str_or_bytes
|
||||
attrib = ... # type: Dict[_str_or_bytes, _str_or_bytes]
|
||||
text = ... # type: Optional[_str_or_bytes]
|
||||
|
||||
@@ -15,7 +15,7 @@ _Ss = TypeVar('_Ss', str, bytes)
|
||||
_T = TypeVar('_T')
|
||||
_str_or_bytes = Union[str, bytes]
|
||||
|
||||
class Element:
|
||||
class Element(Sequence['Element']):
|
||||
tag = ... # type: _str_or_bytes
|
||||
attrib = ... # type: Dict[_str_or_bytes, _str_or_bytes]
|
||||
text = ... # type: Optional[_str_or_bytes]
|
||||
|
||||
@@ -15,7 +15,7 @@ _Ss = TypeVar('_Ss', str, bytes)
|
||||
_T = TypeVar('_T')
|
||||
_str_or_bytes = Union[str, bytes]
|
||||
|
||||
class Element:
|
||||
class Element(Sequence['Element']):
|
||||
tag = ... # type: _str_or_bytes
|
||||
attrib = ... # type: Dict[_str_or_bytes, _str_or_bytes]
|
||||
text = ... # type: Optional[_str_or_bytes]
|
||||
|
||||
@@ -11,7 +11,7 @@ _Ss = TypeVar('_Ss', str, bytes)
|
||||
_T = TypeVar('_T')
|
||||
_str_or_bytes = Union[str, bytes]
|
||||
|
||||
class _ElementInterface:
|
||||
class _ElementInterface(Sequence['_ElementInterface']):
|
||||
tag = ... # type: _str_or_bytes
|
||||
attrib = ... # type: Dict[_str_or_bytes, _str_or_bytes]
|
||||
text = ... # type: Optional[_str_or_bytes]
|
||||
|
||||
Reference in New Issue
Block a user