MCPcopy Index your code
hub / github.com/LabPy/lantz / list_drivers

Function list_drivers

docs/driversdoc.py:295–305  ·  view source on GitHub ↗
(key, module)

Source from the content-addressed store, hash-verified

293
294company_parser = parser.Parser('{_}:company:{:s}', parser.M)
295def list_drivers(key, module):
296 buf = StringIO()
297 for element in dir(module):
298 if element.startswith('_'):
299 continue
300 el = getattr(module, element)
301 if isinstance(el, type) and issubclass(el, Driver):
302 print('Driver found: {}.{}'.format(key,element))
303 doc1 = (el.__doc__ or element).split('\n')[0].strip()
304 buf.write('- :class:`{} <{}.{}>`\n'.format(doc1, key, element))
305 return buf.getvalue()
306
307def list_packages(root_package):
308 packages = {}

Callers 1

mainFunction · 0.85

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected