Browse Source

pycodestyle

4.10
Darko Poljak 3 years ago
parent
commit
51fa8af6b7
  1. 11
      cdist/core/cdist_object.py
  2. 1
      cdist/test/inventory/__init__.py
  3. 1
      setup.py

11
cdist/core/cdist_object.py vendored

@ -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.

1
cdist/test/inventory/__init__.py vendored

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

1
setup.py

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

Loading…
Cancel
Save