1 # This Source Code Form is subject to the terms of the Mozilla Public
2 # License, v. 2.0. If a copy of the MPL was not distributed with this
3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 from . import target_tasks
10 logger
= logging
.getLogger(__name__
)
12 filter_task_functions
= {}
15 def filter_task(name
):
16 """Generator to declare a task filter function."""
19 filter_task_functions
[name
] = func
25 @filter_task("target_tasks_method")
26 def filter_target_tasks(graph
, parameters
, graph_config
):
27 """Proxy filter to use legacy target tasks code.
29 This should go away once target_tasks are converted to filters.
32 attr
= parameters
.get("target_tasks_method", "all_tasks")
33 fn
= target_tasks
.get_method(attr
)
34 return fn(graph
, parameters
, graph_config
)