diff --git a/pyzx/graph/jsonparser.py b/pyzx/graph/jsonparser.py index 78038cd0..68711f18 100644 --- a/pyzx/graph/jsonparser.py +++ b/pyzx/graph/jsonparser.py @@ -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): diff --git a/pyzx/graph/scalar.py b/pyzx/graph/scalar.py index 7a803961..e54e75d6 100644 --- a/pyzx/graph/scalar.py +++ b/pyzx/graph/scalar.py @@ -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: