Skip to content

Commit

Permalink
Don't need use typing.Dict anymore as it turns out
Browse files Browse the repository at this point in the history
  • Loading branch information
askonomm committed Jan 1, 2025
1 parent 21b097b commit 89b4591
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions dompa/dompa.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import annotations
import copy
from typing import Dict, Any, Tuple, Callable, Optional, Union
from typing import Any, Tuple, Callable, Optional, Union
from .nodes import IrNode, TextNode, VoidNode, Node


Expand Down Expand Up @@ -213,7 +213,7 @@ def __ir_node_to_node(self, ir_node: IrNode) -> Node:
children=[],
)

def __node_attributes_from_coords(self, coords: Tuple[int, int]) -> Dict[str, Union[str, bool]]:
def __node_attributes_from_coords(self, coords: Tuple[int, int]) -> dict[str, Union[str, bool]]:
"""
Composes a dictionary of node attributes from the tag located at `coords`.
"""
Expand Down
6 changes: 3 additions & 3 deletions dompa/nodes/node.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
from __future__ import annotations
from typing import Dict, Union
from typing import Union


class Node:
name: str
attributes: Dict[str, Union[str, bool]]
attributes: dict[str, Union[str, bool]]
children: list[Node]

def __init__(self, name: str = None, attributes: Dict[str, Union[str, bool]] = None, children: list[Node] = None) -> None:
def __init__(self, name: str = None, attributes: dict[str, Union[str, bool]] = None, children: list[Node] = None) -> None:
self.name = name or ""
self.attributes = attributes or {}
self.children = children or []

0 comments on commit 89b4591

Please sign in to comment.