MCPcopy
hub / github.com/Nuitka/Nuitka / update

Method update

nuitka/utils/Yaml.py:543–565  ·  view source on GitHub ↗
(self, other)

Source from the content-addressed store, hash-verified

541 return self.data.items()
542
543 def update(self, other):
544 # TODO: Full blown merging, including respecting an overload flag, where
545 # a config replaces another one entirely, for now we expect to not
546 # overlap and offer only merging of implicit-imports.
547 for key, value in other.items():
548 # assert key not in self.data, key
549 if key in self.data:
550 new_implicit_imports = value.get("implicit-imports", None)
551 if new_implicit_imports:
552 value.pop("implicit-imports")
553 if self.data[key].get("implicit-imports", None) is None:
554 self.data[key]["implicit-imports"] = new_implicit_imports
555 else:
556 self.data[key]["implicit-imports"].extend(new_implicit_imports)
557 if len(value) > 0:
558 general.sysexit(
559 "Error, duplicate config for module name '%s' encountered in '%s'."
560 % (key, self.name)
561 )
562 else:
563 general.info("Merged implicit-imports for '%s'." % key)
564 else:
565 self.data[key] = value
566
567
568def getYamlPackage():

Callers 15

runSconsBackendFunction · 0.45
__init__Method · 0.45
PythonOperators.pyFile · 0.45
emitGenerationWarningFunction · 0.45
_addFromNodeFunction · 0.45
__init__Method · 0.45
setupCacheHashSaltFunction · 0.45
getCPythonResultsFunction · 0.45
_makeRecordDataFunction · 0.45
getEnvironmentFunction · 0.45
updateFromBytesMethod · 0.45

Calls 6

lenFunction · 0.85
itemsMethod · 0.45
getMethod · 0.45
popMethod · 0.45
sysexitMethod · 0.45
infoMethod · 0.45

Tested by

no test coverage detected