From 51fa8af6b7d2b43eaf8610479ac4d3e70feb7116 Mon Sep 17 00:00:00 2001 From: Darko Poljak Date: Fri, 15 Feb 2019 20:34:45 +0100 Subject: [PATCH] pycodestyle --- cdist/core/cdist_object.py | 11 ++++++++--- cdist/test/inventory/__init__.py | 1 + setup.py | 1 + 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/cdist/core/cdist_object.py b/cdist/core/cdist_object.py index e2cd22a2..237f0ddd 100644 --- a/cdist/core/cdist_object.py +++ b/cdist/core/cdist_object.py @@ -108,7 +108,9 @@ class CdistObject(object): @staticmethod def split_name(object_name): - """split_name('__type_name/the/object_id') -> ('__type_name', 'the/object_id') + """split_name('__type_name/the/object_id') + -> + ('__type_name', 'the/object_id') Split the given object name into it's type and object_id parts. @@ -119,7 +121,9 @@ class CdistObject(object): @staticmethod def join_name(type_name, object_id): - """join_name('__type_name', 'the/object_id') -> __type_name/the/object_id' + """join_name('__type_name', 'the/object_id') + -> + __type_name/the/object_id' Join the given type_name and object_id into an object name. @@ -162,7 +166,8 @@ class CdistObject(object): # (parameters: %s)" % (self.cdist_type.name, self.parameters)) def object_from_name(self, object_name): - """Convenience method for creating an object instance from an object name. + """Convenience method for creating an object instance from an object + name. Mainly intended to create objects when resolving requirements. diff --git a/cdist/test/inventory/__init__.py b/cdist/test/inventory/__init__.py index 4c0dd936..287c855c 100644 --- a/cdist/test/inventory/__init__.py +++ b/cdist/test/inventory/__init__.py @@ -472,5 +472,6 @@ class InventoryTestCase(test.CdistTestCase): self.assertEqual(htags, ()) os.remove(hostfile) + if __name__ == "__main__": unittest.main() diff --git a/setup.py b/setup.py index f29a8998..565b66ad 100644 --- a/setup.py +++ b/setup.py @@ -25,6 +25,7 @@ def data_finder(data_dir): return entries + cur = os.getcwd() os.chdir("cdist") package_data = data_finder("conf")