Conditions | 4 |
Total Lines | 20 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | #!/usr/bin/env python3 |
||
16 | def filters(self): |
||
17 | |||
18 | for spec in [ |
||
19 | 'ansible.plugins.filter.core', |
||
20 | 'ansible.plugins.filter.mathstuff', |
||
21 | 'ansible.plugins.filter.urls', |
||
22 | 'ansible.plugins.filter.urlsplit', |
||
23 | ]: |
||
24 | |||
25 | mod = importlib.import_module(spec) |
||
26 | |||
27 | if hasattr(mod, 'FilterModule'): |
||
28 | _filters = mod.FilterModule().filters() |
||
29 | for k,v in _filters.items(): |
||
30 | self._filters.update( { |
||
31 | k: [ "{}.{}".format(spec, k), v ] |
||
32 | } ) |
||
33 | |||
34 | del mod |
||
35 | return self._filters |
||
36 | |||
61 |