Skip to content

Commit

Permalink
more 3.8 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
akissinger committed Sep 28, 2024
1 parent dd2be4c commit aab09ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyzx/graph/jsonparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def _new_var(name: str) -> Poly:
except Exception as e:
raise ValueError(e)

def json_to_graph(js: Union[str,dict[str,Any]], backend:Optional[str]=None) -> BaseGraph:
def json_to_graph(js: Union[str,Dict[str,Any]], backend:Optional[str]=None) -> BaseGraph:
"""Converts the json representation of a .qgraph Quantomatic graph into
a pyzx graph. If JSON is given as a string, parse it first."""
if isinstance(js, str):
Expand Down
2 changes: 1 addition & 1 deletion pyzx/graph/scalar.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def to_json(self) -> str:
return json.dumps(self.to_dict())

@classmethod
def from_json(cls, s: Union[str,dict[str,Any]]) -> 'Scalar':
def from_json(cls, s: Union[str,Dict[str,Any]]) -> 'Scalar':
if isinstance(s, str):
d = json.loads(s)
else:
Expand Down

0 comments on commit aab09ad

Please sign in to comment.