Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -381,9 +381,11 @@ def parse(self, encoding: List[int]) -> Tuple[List[BinaryRelation], Dict[str, in
if len(encoding):
for i in encoding:
current_encoding.append(i)
# An encoding is complete when it ends with a relation_id
# or when it contains a none_id and has a length of 7
if i in relation_ids or (i == none_id and len(current_encoding) == 7):
# An encoding is complete when it ends with a relation_id or when it has
# a length of 7, encodings with length above 7 are never valid. Note that
# all incomplete encodings (the 3rd return value of this method) need to
# be processable by build_decoding_constraints!
if i in relation_ids or len(current_encoding) == 7:
# try to decode the current relation encoding
try:
valid_encoding = self.decode(encoding=current_encoding)
Expand Down
Loading