@@ -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.
@@ -1034,7 +1034,7 @@ def __iadd__(self, other: "Reaction") -> "Reaction":
1034
1034
rule2 = other .gene_reaction_rule .strip ()
1035
1035
if rule1 != "" and rule2 != "" :
1036
1036
self .gene_reaction_rule = (
1037
- f"({ self .gene_reaction_rule } ) and " f" ({ other .gene_reaction_rule } )"
1037
+ f"({ self .gene_reaction_rule } ) and ({ other .gene_reaction_rule } )"
1038
1038
)
1039
1039
elif rule1 != "" and rule2 == "" :
1040
1040
self .gene_reaction_rule = rule1
@@ -1247,13 +1247,12 @@ def add_metabolites(
1247
1247
1248
1248
# Make sure metabolites being added belong to the same model, or
1249
1249
# else copy them.
1250
- if isinstance (metabolite , Metabolite ):
1251
- if (
1252
- (metabolite .model is not None )
1253
- and self .model
1254
- and (metabolite .model is not self ._model )
1255
- ):
1256
- metabolite = metabolite .copy ()
1250
+ if isinstance (metabolite , Metabolite ) and (
1251
+ (metabolite .model is not None )
1252
+ and self .model
1253
+ and (metabolite .model is not self ._model )
1254
+ ):
1255
+ metabolite = metabolite .copy ()
1257
1256
1258
1257
met_id = str (metabolite )
1259
1258
# If a metabolite already exists in the reaction then
0 commit comments