Fix black errors
parent
2c8602b3f9
commit
fc332195b3
|
@ -25,15 +25,13 @@ from jinja2.filters import environmentfilter
|
|||
|
||||
|
||||
def _to_paths(*args, **kwargs):
|
||||
""" Convert complex objects to paths. [See examples](https://github.com/ansible-collections/ansible.utils/blob/main/docs/ansible.utils.to_paths_lookup.rst)
|
||||
"""
|
||||
"""Convert complex objects to paths. [See examples](https://github.com/ansible-collections/ansible.utils/blob/main/docs/ansible.utils.to_paths_lookup.rst)"""
|
||||
return to_paths(*args, **kwargs)
|
||||
|
||||
|
||||
@environmentfilter
|
||||
def _get_path(*args, **kwargs):
|
||||
""" Get value using path. [See examples](https://github.com/ansible-collections/ansible.utils/blob/main/docs/ansible.utils.get_path_lookup.rst)
|
||||
"""
|
||||
"""Get value using path. [See examples](https://github.com/ansible-collections/ansible.utils/blob/main/docs/ansible.utils.get_path_lookup.rst)"""
|
||||
kwargs["environment"] = args[0]
|
||||
args = args[1:]
|
||||
return get_path(*args, **kwargs)
|
||||
|
|
|
@ -27,7 +27,7 @@ except ImportError:
|
|||
|
||||
|
||||
def get_path(var, path, environment, wantlist=False):
|
||||
""" Get the value of a path within an object
|
||||
"""Get the value of a path within an object
|
||||
|
||||
:param var: The var from which the value is retrieved
|
||||
:type var: should be dict or list, but jinja can sort that out
|
||||
|
|
|
@ -79,8 +79,7 @@ class TestPathUtils(unittest.TestCase):
|
|||
self.assertIn(expected, str(exc.exception))
|
||||
|
||||
def test_roundtrip_large(self):
|
||||
""" Test the 1000 longest keys, otherwise this takes a _really_ long time
|
||||
"""
|
||||
"""Test the 1000 longest keys, otherwise this takes a _really_ long time"""
|
||||
big_json_path = os.path.join(
|
||||
os.path.dirname(__file__), "fixtures", "large.json"
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue