From 0b36c6762bbcfe91e74120e4950d7a7629aaf217 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 21 Aug 2024 09:35:15 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pysr/sr.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pysr/sr.py b/pysr/sr.py index 6b5901c7..590f6030 100644 --- a/pysr/sr.py +++ b/pysr/sr.py @@ -1017,13 +1017,18 @@ def from_file( params = inspect.signature(model.__init__).parameters # Filter for missing parameters excluding kwargs - missing_params = {k: v for k, v in params.items() if - k not in model.__dict__.keys() and v.name != "self" and v.kind != v.VAR_KEYWORD} + missing_params = { + k: v + for k, v in params.items() + if k not in model.__dict__.keys() + and v.name != "self" + and v.kind != v.VAR_KEYWORD + } # Assign missing attributes for k, v in missing_params.items(): setattr(model, k, v) - + # Update any parameters if necessary, such as # extra_sympy_mappings: model.set_params(**pysr_kwargs)