We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a924bdd commit 595598dCopy full SHA for 595598d
planemo/linters/util.py
@@ -0,0 +1,16 @@
1
+from typing import (
2
+ Optional,
3
+ TYPE_CHECKING,
4
+)
5
+
6
+if TYPE_CHECKING:
7
+ from galaxy.tool_util.parser.interface import ToolSource
8
+ from galaxy.util import Element
9
10
11
+def xml_node_from_toolsource(tool_source: "ToolSource", tag: "str") -> Optional["Element"]:
12
+ node = None
13
+ xml_tree = getattr(tool_source, "xml_tree", None)
14
+ if xml_tree:
15
+ node = xml_tree.find(tag)
16
+ return node
0 commit comments