MCPcopy Create free account
hub / github.com/aboutcode-org/scancode-toolkit / update

Method update

src/packagedcode/models.py:533–544  ·  view source on GitHub ↗

Update this reference with an other file reference only for non-empty values.

(self, other)

Source from the content-addressed store, hash-verified

531 )
532
533 def update(self, other):
534 """
535 Update this reference with an other file reference only for non-empty
536 values.
537 """
538 for name, value in other.to_dict().items():
539 if not value:
540 continue
541 current = getattr(self, name, None)
542 if not current:
543 setattr(self, name, value)
544 return self
545
546
547@attr.attributes(slots=True)

Callers

nothing calls this directly

Calls 1

to_dictMethod · 0.45

Tested by

no test coverage detected