Skip to content

Commit ba97671

Browse files
committed
type: using the correct types por pyi dict values
1 parent 40ffbeb commit ba97671

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

rxml.pyi

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from enum import Enum
2-
from typing import Any
2+
3+
DictTypes = str | dict[str, str] | list[DictTypes] | None
34

45
class SearchType(Enum):
56
Tag: int
@@ -26,8 +27,8 @@ class Node:
2627
self, by: SearchType, value: str, depth: int | None = None
2728
) -> list[Node]: ...
2829
@classmethod
29-
def from_dict(cls, dict_: dict[str, Any]) -> Node: ...
30-
def to_dict(self) -> dict[str, Any]: ...
30+
def from_dict(cls, dict_: dict[str, DictTypes]) -> Node: ...
31+
def to_dict(self) -> dict[str, DictTypes]: ...
3132

3233
def read_file(file_path: str, root_tag: str) -> Node: ...
3334
def read_string(xml_string: str, root_tag: str) -> Node: ...

0 commit comments

Comments
 (0)