Skip to content

Commit 22d3fc8

Browse files
committed
Make pygraphviz availability check ty-friendly
1 parent c6f37f2 commit 22d3fc8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tests/test_dag_command.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from __future__ import annotations
22

3+
import importlib
34
import os
45
import subprocess
56
import sys
@@ -12,7 +13,7 @@
1213
from pytask import cli
1314

1415
try:
15-
import pygraphviz # type: ignore[unresolved-import] # noqa: F401
16+
importlib.import_module("pygraphviz")
1617
except ImportError: # pragma: no cover
1718
_IS_PYGRAPHVIZ_INSTALLED = False
1819
else:

0 commit comments

Comments
 (0)