Skip to content

Commit

Permalink
Pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Lilly-May committed Aug 30, 2024
1 parent e6f1498 commit 9d2ebc4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pertpy/tools/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
from importlib import import_module


def lazy_import(module_path, class_name, extras):
try:
for extra in extras:
import_module(extra)
module = import_module(module_path)
return getattr(module, class_name)
except ImportError as e:
except ImportError:

class Placeholder:
def __init__(self, *args, **kwargs):
raise ImportError(
Expand Down

0 comments on commit 9d2ebc4

Please sign in to comment.