diff --git a/maud/data_model/kinetic_model.py b/maud/data_model/kinetic_model.py index 13be12c0..1da7dd32 100644 --- a/maud/data_model/kinetic_model.py +++ b/maud/data_model/kinetic_model.py @@ -437,15 +437,11 @@ def correct_conserved_moieties_defined(self): left_nullspace = self.left_nullspace.values left_nullspace = left_nullspace.astype(int) if len(left_nullspace) > 0: - mgs = sorted( - [con_moi.moiety_group for con_moi in self.conserved_moiety] - ) - cms = sorted( - [ - [m for m, n in zip(balanced_metabolites, lns) if n] - for lns in left_nullspace - ] - ) + mgs = [sorted(con_moi.moiety_group) for con_moi in self.conserved_moiety] + cms = [ + sorted([m for m, n in zip(balanced_metabolites, lns) if n]) + for lns in left_nullspace + ] for cm in cms: assert ( cm in mgs