diff --git a/baselines/t5/data/deepbank/graph_linear_utils.py b/baselines/t5/data/deepbank/graph_linear_utils.py index cfc382843..05c37c8c4 100644 --- a/baselines/t5/data/deepbank/graph_linear_utils.py +++ b/baselines/t5/data/deepbank/graph_linear_utils.py @@ -21,7 +21,7 @@ *encoding*, going from a graph triples to a tree is called *configuration*, and going from a tree to a penman string is called *formatting*. """ -from typing import Union, List, Tuple, Dict, Any, cast +from typing import List, Tuple, Any, cast from data.deepbank import tree_utils # local file import from baselines.t5 # Node indexes. @@ -33,7 +33,7 @@ # Node contexts for constructing a tree structure. Node = Tuple[Variable, List[Branch]] # Node index to node contexts map. -NodeMap = Dict[Variable, Union[Node, None]] +NodeMap = dict[Variable, Node] # A graph triple. Triple = Tuple[str, str, str] # A list of triples from the graph.