Skip to content

Commit

Permalink
Keep XDotParser importable from old location
Browse files Browse the repository at this point in the history
  • Loading branch information
flying-sheep authored and jrfonseca committed Sep 15, 2022
1 parent 9dbec2c commit d4b734e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions xdot/dot/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@
SUBGRAPH = 18


def __getattr__(name: str):
if name == "XDotParser":
from ..ui._xdotparser import XDotParser
return XDotParser
return AttributeError(f"module {__name__!r} has no attribute {name!r}")


class Parser:

def __init__(self, lexer):
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion xdot/ui/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

from . import actions
from ..dot.lexer import ParseError
from .xdotparser import XDotParser
from ._xdotparser import XDotParser
from . import animation
from . import actions
from .elements import Graph
Expand Down

0 comments on commit d4b734e

Please sign in to comment.