Skip to content

Commit

Permalink
fix(events): gate XSH import to avoid circular import
Browse files Browse the repository at this point in the history
events needs to be free from as many internal dependencies as possible
to allow early import
  • Loading branch information
gforsyth committed Jul 21, 2023
1 parent f845932 commit 224d9e6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion xonsh/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import collections.abc
import inspect

from xonsh.built_ins import XSH
from xonsh.tools import print_exception


Expand All @@ -22,6 +21,8 @@ def has_kwargs(func):


def debug_level():
from xonsh.built_ins import XSH

if XSH.env:
return XSH.env.get("XONSH_DEBUG")
# FIXME: Under pytest, return 1(?)
Expand Down

0 comments on commit 224d9e6

Please sign in to comment.