utils
Here some useful functions in the rest of macsyfinder code
utils API reference
get_def_to_detect
- macsypy.utils.get_def_to_detect(models, model_registry)[source]
- Parameters:
models (list of tuple with the following structure: [('model_fqn', ('def1, def2, ...)), ('model_2', ('def1', ...)), ...]) – the list of models to detect as returned by config.models.
model_registry (
macsypy.registries.ModelRegistry
object.) – the models registry for this run.
- Returns:
the definitions to parse
- Return type:
list of
macsypy.registries.DefinitionLocation
objects- Raises:
ValueError – if a model name provided in models is not in model_registry.