-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Description
fabric.main.is_task_module is currently defined like this:
def is_task_module(a):
"""
Determine if the provided value is a task module
"""
#return (type(a) is types.ModuleType and
# any(map(is_task_object, vars(a).values())))
if type(a) is types.ModuleType and a not in _seen:
# Flag module as seen
_seen.add(a)
# Signal that we need to check it out
return True
What's the purpose of type(a) is types.ModuleType? It would be great if isinstance(a, types.ModuleType) is sufficient.
I was trying to use types.ModuleType subclass and fabric fails to discover tasks in this case.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels