Skip to content

Commit 98b4ee4

Browse files
committed
Update comments.
1 parent cf89158 commit 98b4ee4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sphinx_autofixture/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ def is_fixture(function: Union[FunctionType, MethodType]) -> Tuple[bool, Optiona
103103
:param function:
104104
"""
105105

106+
# TODO: should this be relaxed? It seems inspect.getsource can find these after all.
107+
# But can they work as fixtures?
106108
if "<locals>" in function.__qualname__:
107109
# Can't get source code for these (issue #6)
108110
return False, None
@@ -112,7 +114,7 @@ def is_fixture(function: Union[FunctionType, MethodType]) -> Tuple[bool, Optiona
112114
try:
113115
source = inspect.getsource(function)
114116
except OSError:
115-
# May be encountered when trying to parse a function defined in <locals> (issue #6)
117+
# May be encountered with dataclasses where there's no source for the dynamic methods (issue #6)
116118
return False, None
117119

118120
try:

0 commit comments

Comments
 (0)