Skip to content

Commit 7ea3c59

Browse files
authored
fix: 🐛 Don't call ProfileLoader.init if not required
1 parent 2b32a68 commit 7ea3c59

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

injection/entrypoint.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,9 @@ def _make_decorator[*Ts, _T](
153153
setup_method = profile_loader.module.make_injected_function(setup_method)
154154

155155
def decorator(function: Callable[P, T]) -> Callable[P, _T]:
156-
profile_loader.init()
156+
if profile_loader.module_subsets:
157+
profile_loader.init()
158+
157159
self = cls(function, profile_loader)
158160
return MethodType(setup_method, self)().function
159161

0 commit comments

Comments
 (0)