MCPcopy Create free account
hub / github.com/kiibohd/controller / CustomLoader

Class CustomLoader

Scan/TestIn/interface.py:51–60  ·  view source on GitHub ↗

Compatibility Class Used to work around importlib.util.module_from_spec() not being available.

Source from the content-addressed store, hash-verified

49 return file.read()
50
51class CustomLoader( FileLoader, SourceLoader ):
52 '''
53 Compatibility Class
54 Used to work around importlib.util.module_from_spec() not being available.
55 '''
56 def get_code( self, fullname ):
57 source = self.get_source( fullname )
58 path = self.get_filename( fullname )
59 parsed = ast.parse( source )
60 return compile( parsed, path, 'exec', dont_inherit=True, optimize=0 )
61
62
63

Callers 2

__init__Method · 0.85
interface.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…