Skip to content

Commit

Permalink
Format code with black
Browse files Browse the repository at this point in the history
This commit fixes the style issues introduced in 1443fba according to the output
from black.

Details: https://deepsource.io/gh/MilesCranmer/PySR/transform/99c6e3c5-2014-4378-8de4-c4453d52e164/
  • Loading branch information
deepsource-autofix[bot] authored May 7, 2022
1 parent 1443fba commit 042b27f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion benchmarks/space.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@
"crossover_probability", np.log(0.00001), np.log(0.2)
),
# perturbation_factor=1.0,
perturbation_factor=hp.loguniform("perturbation_factor", np.log(0.0001), np.log(100)),
perturbation_factor=hp.loguniform(
"perturbation_factor", np.log(0.0001), np.log(100)
),
# maxsize=20,
maxsize=hp.choice("maxsize", [30]),
# warmup_maxsize_by=0.0,
Expand Down
3 changes: 2 additions & 1 deletion pysr/deprecated.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Various functions to deprecate features."""


def make_deprecated_kwargs_for_pysr_regressor():
"""Create dict of deprecated kwargs."""

Expand Down Expand Up @@ -33,4 +34,4 @@ def make_deprecated_kwargs_for_pysr_regressor():
old, new = line.split("=>")
deprecated_kwargs[old] = new

return deprecated_kwargs
return deprecated_kwargs
3 changes: 2 additions & 1 deletion test/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ def test_feature_selection_handler(self):

class TestMiscellaneous(unittest.TestCase):
"""Test miscellaneous functions."""

def test_deprecation(self):
# Ensure that deprecation works as expected, with a warning,
# and sets the correct value.
Expand All @@ -276,4 +277,4 @@ def test_deprecation(self):
# This is a deprecated parameter, so we should get a warning.

# The correct value should be set:
self.assertEqual(model.params["fraction_replaced"], 0.2)
self.assertEqual(model.params["fraction_replaced"], 0.2)

0 comments on commit 042b27f

Please sign in to comment.