You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like ignore-nested-functions to work with coroutines (i.e. async def). However if either function is actually a coroutine, it does not work
Is your feature request related to a problem?
I'm frustrated when I have to add docstrings to unimportant functions and I can't avoid it just because of how they are defined i.e. there is nothing materially different between a function and coroutine when it comes to docstrings and their necessity (or lack thereof)
Ran into this myself src/interrogate/visit.py should be updated to look like:
@@ -114,7 +114,7 @@ class CoverageVisitor(ast.NodeVisitor):
if parent is None:
return False
# is it a nested function?
- if parent.node_type == "FunctionDef" and node_type == "FunctionDef":
+ if parent.node_type in ("FunctionDef", "AsyncFunctionDef") and node_type in ("FunctionDef", "AsyncFunctionDef"):
return True
return False
Describe the feature you'd like
I'd like
ignore-nested-functions
to work with coroutines (i.e.async def
). However if either function is actually a coroutine, it does not workIs your feature request related to a problem?
I'm frustrated when I have to add docstrings to unimportant functions and I can't avoid it just because of how they are defined i.e. there is nothing materially different between a function and coroutine when it comes to docstrings and their necessity (or lack thereof)
Your Environment
interrogate
version(s) (interrogate --version
: 1.5.0The text was updated successfully, but these errors were encountered: