| Conditions | 4 |
| Total Lines | 20 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | #!/usr/bin/env python3 |
||
| 16 | 1 | def filters(self): |
|
| 17 | |||
| 18 | 1 | 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 | 1 | mod = importlib.import_module(spec) |
|
| 26 | |||
| 27 | 1 | if hasattr(mod, 'FilterModule'): |
|
| 28 | 1 | _filters = mod.FilterModule().filters() |
|
| 29 | 1 | for k,v in _filters.items(): |
|
| 30 | 1 | self._filters.update( { |
|
| 31 | k: [ "{}.{}".format(spec, k), v ] |
||
| 32 | } ) |
||
| 33 | |||
| 34 | 1 | del mod |
|
| 35 | 1 | return self._filters |
|
| 36 | |||
| 61 |