MCPcopy
hub / github.com/jupyter/nbdime / append

Method append

nbdime/diff_format.py:140–153  ·  view source on GitHub ↗
(self, entry)

Source from the content-addressed store, hash-verified

138 return sorted(self._diff.values(), key=lambda x: x.key)
139
140 def append(self, entry):
141 # Simplifies some algorithms
142 if entry is None:
143 return
144
145 # Typechecking (just for internal consistency checking)
146 assert isinstance(entry, DiffEntry)
147 assert "op" in entry
148 assert entry.op in MappingDiffBuilder.OPS
149 assert "key" in entry
150 assert entry.key not in self._diff
151
152 # Add entry!
153 self._diff[entry.key] = entry
154
155 def add(self, key, value):
156 self.append(op_add(key, value))

Callers 15

addMethod · 0.95
removeMethod · 0.95
replaceMethod · 0.95
patchMethod · 0.95
diff_single_outputsFunction · 0.95
sendBeaconFunction · 0.45
install_dependenciesFunction · 0.45
__str__Method · 0.45
_combine_opsFunction · 0.45
to_json_patchFunction · 0.45
patch_listFunction · 0.45

Calls

no outgoing calls

Tested by 5

brute_force_snakesFunction · 0.36
_any_nb_pair_namesFunction · 0.36
_matching_nb_pair_namesFunction · 0.36