Skip to content

Commit

Permalink
Correct name of function to check
Browse files Browse the repository at this point in the history
  • Loading branch information
callumforrester committed Jan 31, 2025
1 parent 21d7352 commit 62f60b2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/blueapi/utils/modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ def get_named_subset(names: list[str]):


def is_function_sourced_from_module(
obj: Callable[..., Any], module: ModuleType
func: Callable[..., Any], module: ModuleType
) -> bool:
"""
Check if an object is originally from a particular module, useful to detect
Check if a function is originally from a particular module, useful to detect
whether it actually comes from a nested import.
Args:
obj: Object to check
func: Object to check
module: Module to check against object
"""
return importlib.import_module(obj.__module__) is module
return importlib.import_module(func.__module__) is module

0 comments on commit 62f60b2

Please sign in to comment.