Skip to content

Commit b0f1afb

Browse files
Merge pull request #270 from askui/fix/playwright-import
fix: add missing import guard for PlaywrightBaseTool
2 parents e480db5 + c24179e commit b0f1afb

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
from .android_base_tool import AndroidBaseTool
22
from .computer_base_tool import ComputerBaseTool
3-
from .playwright_base_tool import PlaywrightBaseTool
43
from .tool_tags import ToolTags
54

5+
try:
6+
from .playwright_base_tool import PlaywrightBaseTool
7+
8+
_PLAYWRIGHT_AVAILABLE = True
9+
except ImportError:
10+
_PLAYWRIGHT_AVAILABLE = False
11+
12+
613
__all__ = [
714
"AndroidBaseTool",
815
"ComputerBaseTool",
9-
"PlaywrightBaseTool",
1016
"ToolTags",
1117
]
18+
19+
if _PLAYWRIGHT_AVAILABLE:
20+
__all__ += ["PlaywrightBaseTool"]

0 commit comments

Comments
 (0)