bf25294aa9a4c28f841a728ea793ac71d8364b6d,compiler/quilt/nodes.py,GroupNode,__repr__,#GroupNode#,77
Before Change
items += sorted(self._data_keys())
// strip last new line if needed
if items[-1] == "\n":
items.pop()
// compare with + 1 helps to prevent hide under "..." only one item
if len(items) > PRETTY_MAX_LEN + 1:
preview = PRETTY_MAX_LEN // 2
items = items[:preview] + ["\n...\n"] + items[-preview:]
After Change
def __repr__(self):
pinfo = super(GroupNode, self).__repr__()
group_info = "\n".join(name + "/" for name in sorted(self._group_keys()))
if group_info:
group_info += "\n"
data_info = "\n".join(sorted(self._data_keys()))
return "%s\n%s%s" % (pinfo, group_info, data_info)
def _items(self):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances Project Name: quiltdata/quilt
Commit Name: bf25294aa9a4c28f841a728ea793ac71d8364b6d
Time: 2018-05-10
Author: akarve@users.noreply.github.com
File Name: compiler/quilt/nodes.py
Class Name: GroupNode
Method Name: __repr__
Project Name: analysiscenter/batchflow
Commit Name: 8a84a02f44efb38c339c019ab097b00fab3701af
Time: 2019-09-03
Author: Tsimfer.SA@gazprom-neft.ru
File Name: batchflow/models/tf/encoder_decoder.py
Class Name: EncoderDecoder
Method Name: encoder
Project Name: analysiscenter/batchflow
Commit Name: 8a84a02f44efb38c339c019ab097b00fab3701af
Time: 2019-09-03
Author: Tsimfer.SA@gazprom-neft.ru
File Name: batchflow/models/tf/encoder_decoder.py
Class Name: EncoderDecoder
Method Name: decoder