MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / generate_imports

Method generate_imports

tools/PythonExtensionChecker.py:554–565  ·  view source on GitHub ↗

Generate default imports

(imports)

Source from the content-addressed store, hash-verified

552
553 @staticmethod
554 def generate_imports(imports):
555 """
556 Generate default imports
557 """
558 res = ""
559 res += "from Types cimport *\n"
560 for k in sorted(imports.keys()):
561 if k == "bool":
562 res += "from libcpp cimport bool\n"
563 else:
564 res += "from libcpp.%s cimport %s as libcpp_%s\n" % (k,k,k)
565 return res
566
567 @staticmethod
568 def compute_imports(declaration, imports):

Callers 1

get_pxd_from_classMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected