Fix black errors

pull/1/head
cidrblock 2020-10-12 12:18:10 -07:00
parent 2c8602b3f9
commit fc332195b3
3 changed files with 4 additions and 7 deletions

View File

@ -25,15 +25,13 @@ from jinja2.filters import environmentfilter
def _to_paths(*args, **kwargs): 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) return to_paths(*args, **kwargs)
@environmentfilter @environmentfilter
def _get_path(*args, **kwargs): 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] kwargs["environment"] = args[0]
args = args[1:] args = args[1:]
return get_path(*args, **kwargs) return get_path(*args, **kwargs)

View File

@ -27,7 +27,7 @@ except ImportError:
def get_path(var, path, environment, wantlist=False): 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 :param var: The var from which the value is retrieved
:type var: should be dict or list, but jinja can sort that out :type var: should be dict or list, but jinja can sort that out

View File

@ -79,8 +79,7 @@ class TestPathUtils(unittest.TestCase):
self.assertIn(expected, str(exc.exception)) self.assertIn(expected, str(exc.exception))
def test_roundtrip_large(self): 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( big_json_path = os.path.join(
os.path.dirname(__file__), "fixtures", "large.json" os.path.dirname(__file__), "fixtures", "large.json"
) )