Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def get_ast_names(astnode):
"""Return symbol Names from an AST node."""
finder = NameFinder()
finder.generic_visit(astnode)
return finder.names
def model(self, value):
if callable(value):
model = value()
else:
model = value
self._model = model
self.current_result = None
self._current_params = model.make_params()
# Use these to evaluate any Parameters that use expressions.
self.asteval = Interpreter()
self.namefinder = NameFinder()
self._finalize_model(value)
self.guess()