Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 9, 2024
1 parent 4d4ecf5 commit bb74f63
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion skbase/base/_clone_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"""
__all__ = ["_clone", "_check_clone"]

from skbase.base._clone_plugins import _CloneCatchAll, DEFAULT_CLONE_PLUGINS
from skbase.base._clone_plugins import DEFAULT_CLONE_PLUGINS, _CloneCatchAll

Check notice

Code scanning / CodeQL

Cyclic import Note

Import of module
skbase.base._clone_plugins
begins an import cycle.


# Adapted from sklearn's `_clone_parametrized()`
Expand Down
4 changes: 2 additions & 2 deletions skbase/base/_clone_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def recursive_clone(self, obj):
"base_cls": self.base_cls,
}
return _clone(obj, **recursion_kwargs)


class _CloneClass(BaseCloner):
"""Clone plugin for classes. Returns the class."""
Expand Down Expand Up @@ -136,7 +136,7 @@ def _check(self, obj):
def _clone(self, obj):
"""Return a clone of obj."""
new_object = _default_clone(estimator=obj)

# Ensure that configs are retained in the new object
if obj.get_config()["clone_config"]:
new_object.set_config(**obj.get_config())
Expand Down

0 comments on commit bb74f63

Please sign in to comment.