Skip to content

Commit

Permalink
fix scverse#207 ete3 warning masks other ImportErrors
Browse files Browse the repository at this point in the history
  • Loading branch information
Moomboh committed Feb 23, 2023
1 parent 15f2b1c commit 8fc9298
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions pertpy/tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
from pertpy.tools._mixscape import Mixscape

try:
from pertpy.tools._sccoda import Sccoda
from pertpy.tools._tasccoda import Tasccoda
except ImportError:
print("[bold yellow]To use sccoda or tasccoda please install ete3 with [green]pip install ete3")
from pertpy.tools.coda._sccoda import Sccoda
from pertpy.tools.coda._tasccoda import Tasccoda
except ImportError as e:
if "ete3" in str(e):
print("[bold yellow]To use sccoda or tasccoda please install ete3 with `pip install ete3`")
else:
raise e

0 comments on commit 8fc9298

Please sign in to comment.