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

Class DiffEntry

nbdime/diff_format.py:19–34  ·  view source on GitHub ↗

For internal usage in nbdime library. Minimal class providing attribute access to diff entiry keys. Tip: If performance dictates, we can easily replace this with a namedtuple during processing of diffs and convert to dicts before any json conversions.

Source from the content-addressed store, hash-verified

17
18
19class DiffEntry(dict):
20 """For internal usage in nbdime library.
21
22 Minimal class providing attribute access to diff entiry keys.
23
24 Tip: If performance dictates, we can easily replace this
25 with a namedtuple during processing of diffs and convert
26 to dicts before any json conversions.
27 """
28 def __getattr__(self, name):
29 if name.startswith("__") and name.endswith("__"):
30 return self.__getattribute__(name)
31 return self[name]
32
33 def __setattr__(self, name, value):
34 self[name] = value
35
36
37class DiffOp:

Callers 9

offset_opFunction · 0.85
to_diffentry_dictsFunction · 0.85
op_addFunction · 0.85
op_removeFunction · 0.85
op_replaceFunction · 0.85
op_addrangeFunction · 0.85
op_removerangeFunction · 0.85
op_patchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected