pycodestyle

This commit is contained in:
Darko Poljak 2019-02-15 20:34:45 +01:00
parent ef9d5494cd
commit 51fa8af6b7
3 changed files with 10 additions and 3 deletions

View file

@ -108,7 +108,9 @@ class CdistObject(object):
@staticmethod @staticmethod
def split_name(object_name): 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. Split the given object name into it's type and object_id parts.
@ -119,7 +121,9 @@ class CdistObject(object):
@staticmethod @staticmethod
def join_name(type_name, object_id): 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. 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)) # (parameters: %s)" % (self.cdist_type.name, self.parameters))
def object_from_name(self, object_name): 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. Mainly intended to create objects when resolving requirements.

View file

@ -472,5 +472,6 @@ class InventoryTestCase(test.CdistTestCase):
self.assertEqual(htags, ()) self.assertEqual(htags, ())
os.remove(hostfile) os.remove(hostfile)
if __name__ == "__main__": if __name__ == "__main__":
unittest.main() unittest.main()

View file

@ -25,6 +25,7 @@ def data_finder(data_dir):
return entries return entries
cur = os.getcwd() cur = os.getcwd()
os.chdir("cdist") os.chdir("cdist")
package_data = data_finder("conf") package_data = data_finder("conf")