Skip to content

Commit 5f03c71

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 2ea7530 commit 5f03c71

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

pysr/sr.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2196,7 +2196,9 @@ def _run(
21962196
)
21972197

21982198
mutation_weights = SymbolicRegression.MutationWeights(
2199-
mutate_constant=(self.weight_mutate_constant if self.use_constants else 0.0),
2199+
mutate_constant=(
2200+
self.weight_mutate_constant if self.use_constants else 0.0
2201+
),
22002202
mutate_operator=self.weight_mutate_operator,
22012203
mutate_feature=self.weight_mutate_feature,
22022204
swap_operands=self.weight_swap_operands,

pysr/test/test_main.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,8 @@ def test_use_constants_conflicts_with_complexity_of_constants(self):
11361136
)
11371137

11381138
with self.assertRaisesRegex(
1139-
ValueError, r"`use_constants=False` cannot be combined with `complexity_of_constants`"
1139+
ValueError,
1140+
r"`use_constants=False` cannot be combined with `complexity_of_constants`",
11401141
):
11411142
model.fit(X, y)
11421143

@@ -1150,7 +1151,8 @@ def test_use_constants_conflicts_with_complexity_mapping(self):
11501151
)
11511152

11521153
with self.assertRaisesRegex(
1153-
ValueError, r"`use_constants=False` cannot be combined with `complexity_mapping`"
1154+
ValueError,
1155+
r"`use_constants=False` cannot be combined with `complexity_mapping`",
11541156
):
11551157
model.fit(X, y)
11561158

0 commit comments

Comments
 (0)