Bug 1755481: correct documentation of `nsIClipboard::getData`. r=mccr8
[gecko.git] / taskcluster / gecko_taskgraph / filter_tasks.py
blob63bd2874d6fe6bef0a88aa1fd08fc63512048ca7
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/.
6 import logging
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."""
18 def wrap(func):
19 filter_task_functions[name] = func
20 return func
22 return wrap
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.
30 """
32 attr = parameters.get("target_tasks_method", "all_tasks")
33 fn = target_tasks.get_method(attr)
34 return fn(graph, parameters, graph_config)