Skip to content

Commit

Permalink
typing
Browse files Browse the repository at this point in the history
  • Loading branch information
RazinShaikh committed Jul 4, 2024
1 parent 01ab524 commit 6b01ad2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zxlive/common.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os
from enum import IntEnum
from typing import Final, Dict, Any
from typing import Final, Dict, Any, Optional

from pyzx import EdgeType
from typing_extensions import TypeAlias
Expand Down Expand Up @@ -248,7 +248,7 @@ def _get_synonyms(key: str, default: list[str]) -> list[str]:
def to_tikz(g: GraphT) -> str:
return pyzx.tikz.to_tikz(g) # type: ignore

def from_tikz(s: str) -> GraphT:
def from_tikz(s: str) -> Optional[GraphT]:
try:
return pyzx.tikz.tikz_to_graph(s)
except Exception as e:
Expand Down

0 comments on commit 6b01ad2

Please sign in to comment.