MCPcopy Index your code
hub / github.com/CadQuery/cadquery / _find_vars

Method _find_vars

cadquery/cqgi.py:54–69  ·  view source on GitHub ↗

Parse the script, and populate variables that appear to be overridable.

(self)

Source from the content-addressed store, hash-verified

52 self._find_descriptions()
53
54 def _find_vars(self):
55 """
56 Parse the script, and populate variables that appear to be
57 overridable.
58 """
59 # assumption here: we assume that variable declarations
60 # are only at the top level of the script. IE, we'll ignore any
61 # variable definitions at lower levels of the script
62
63 # we don't want to use the visit interface because here we explicitly
64 # want to walk only the top level of the tree.
65 assignment_finder = ConstantAssignmentFinder(self.metadata)
66
67 for node in self.ast_tree.body:
68 if isinstance(node, ast.Assign):
69 assignment_finder.visit_Assign(node)
70
71 def _find_descriptions(self):
72 description_finder = ParameterDescriptionFinder(self.metadata)

Callers 1

__init__Method · 0.95

Calls 2

visit_AssignMethod · 0.95

Tested by

no test coverage detected