Skip to content

Commit

Permalink
#353 related fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolay-r committed Jul 9, 2022
1 parent cd8275b commit a40ccdf
Showing 1 changed file with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions arekit/common/folding/united.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,10 @@ class UnitedFolding(BaseDataFolding):

def __init__(self, foldings):
assert(isinstance(foldings, list))

states_count = None

# Guarantee exact the same states count as passed parameter.
for folding in foldings:
assert(isinstance(folding, BaseDataFolding))
if states_count is None:
states_count = folding._states
assert(folding._states == states_count)

self.__foldings = foldings

super(UnitedFolding, self).__init__(
doc_ids_to_fold=UnitedFolding.__iter_all_doc_ids(foldings),
supported_data_types=list(set(UnitedFolding.__iter_all_data_types(foldings))),
states_count=states_count)
supported_data_types=list(set(UnitedFolding.__iter_all_data_types(foldings))))

@property
def Name(self):
Expand Down Expand Up @@ -60,10 +48,3 @@ def fold_doc_ids_set(self):
self.__merge(origin=origin, new_data=new_data)

return origin

def _assign_index(self, i):
""" Update current index for every folding.
"""
for folding in self.__foldings:
assert(isinstance(folding, BaseDataFolding))
folding._assign_index(i)

0 comments on commit a40ccdf

Please sign in to comment.