MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / is_engine

Function is_engine

methods.py:269–277  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

267 modules[module_name] = module_path
268
269 def is_engine(path):
270 # Prevent recursively detecting modules in self and other
271 # Godot sources when using `custom_modules` build option.
272 version_path = os.path.join(path, "version.py")
273 if os.path.exists(version_path):
274 with open(version_path, "r", encoding="utf-8") as f:
275 if 'short_name = "redot"' in f.read():
276 return True
277 return False
278
279 def get_files(path):
280 files = glob.glob(os.path.join(path, "*"))

Callers 1

detect_modulesFunction · 0.85

Calls 3

joinMethod · 0.80
existsMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected