From fc332195b311ff06ce56bd3d0bc2337c4bce679e Mon Sep 17 00:00:00 2001 From: cidrblock Date: Mon, 12 Oct 2020 12:18:10 -0700 Subject: [PATCH] Fix black errors --- plugins/filter/paths.py | 6 ++---- plugins/module_utils/path_utils.py | 2 +- tests/unit/module_utils/test_path_utils.py | 3 +-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/plugins/filter/paths.py b/plugins/filter/paths.py index 03104e3..4d9fce0 100644 --- a/plugins/filter/paths.py +++ b/plugins/filter/paths.py @@ -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) diff --git a/plugins/module_utils/path_utils.py b/plugins/module_utils/path_utils.py index 317d55f..418ccd5 100644 --- a/plugins/module_utils/path_utils.py +++ b/plugins/module_utils/path_utils.py @@ -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 diff --git a/tests/unit/module_utils/test_path_utils.py b/tests/unit/module_utils/test_path_utils.py index 7823600..f9dd975 100644 --- a/tests/unit/module_utils/test_path_utils.py +++ b/tests/unit/module_utils/test_path_utils.py @@ -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" )