Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
snyaggarwal committed May 23, 2022
1 parent 0c0a413 commit 1825849
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/importers/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ def make_parts(self):
prev_line = line

@staticmethod
def chunker_list(seq, size, is_child):
def chunker_list(seq, size, is_child): # pylint: disable=too-many-locals
"""
1. returns n number of sequential chunks from l.
2. makes sure concept versions are grouped in single list
Expand All @@ -859,7 +859,7 @@ def chunker_list(seq, size, is_child):
si = (quotient+1)*(i if i < remainder else remainder) + quotient*(0 if i < remainder else i - remainder)
current = list(sorted_seq[si:si + (quotient + 1 if i < remainder else quotient)])
if not is_source_child or not get(result, '-1', None):
if len(current):
if current:
result.append(current)
continue
prev = get(result, '-1', None)
Expand All @@ -875,7 +875,7 @@ def chunker_list(seq, size, is_child):
break
if shift:
current = current[shift:]
if len(current):
if current:
result.append(current)
return result

Expand Down

0 comments on commit 1825849

Please sign in to comment.