@@ -585,8 +585,8 @@ def metabolites(self, value: Dict[Metabolite, float]) -> None:
585
585
"""Set metabolites to a dictionary of metabolites and coefficients.
586
586
587
587
Parameters
588
- -------
589
- metabolites : Dict[Metabolite, float]
588
+ ----------
589
+ value : Dict[Metabolite, float]
590
590
A dictionary of cobra.Metabolite for keys and floats for coeffecieints.
591
591
Positive coefficient means the reaction produces this metabolite, while
592
592
negative coefficient means the reaction consumes this metabolite.
@@ -1014,7 +1014,7 @@ def __iadd__(self, other: "Reaction") -> "Reaction":
1014
1014
rule2 = other .gene_reaction_rule .strip ()
1015
1015
if rule1 != "" and rule2 != "" :
1016
1016
self .gene_reaction_rule = (
1017
- f"({ self .gene_reaction_rule } ) and " f" ({ other .gene_reaction_rule } )"
1017
+ f"({ self .gene_reaction_rule } ) and ({ other .gene_reaction_rule } )"
1018
1018
)
1019
1019
elif rule1 != "" and rule2 == "" :
1020
1020
self .gene_reaction_rule = rule1
@@ -1227,13 +1227,12 @@ def add_metabolites(
1227
1227
1228
1228
# Make sure metabolites being added belong to the same model, or
1229
1229
# else copy them.
1230
- if isinstance (metabolite , Metabolite ):
1231
- if (
1232
- (metabolite .model is not None )
1233
- and self .model
1234
- and (metabolite .model is not self ._model )
1235
- ):
1236
- metabolite = metabolite .copy ()
1230
+ if isinstance (metabolite , Metabolite ) and (
1231
+ (metabolite .model is not None )
1232
+ and self .model
1233
+ and (metabolite .model is not self ._model )
1234
+ ):
1235
+ metabolite = metabolite .copy ()
1237
1236
1238
1237
met_id = str (metabolite )
1239
1238
# If a metabolite already exists in the reaction then
0 commit comments