Skip to content

Commit a2b5d4e

Browse files
committed
minor fix for cases without any docstring
1 parent 203869e commit a2b5d4e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docstring.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def get_docstring_args(fd, file_name, func_name, class_name=None):
1010
Extract docstring parameters from function definition
1111
"""
1212
docstring = ast.get_docstring(fd)
13-
if len(re.findall(r"Parameters", docstring)) != 1:
13+
if docstring is None or len(re.findall(r"Parameters", docstring)) != 1:
1414
msg = "Missing required 'Parameters' section in docstring in \n"
1515
msg += f"file: {file_name}\n"
1616
if class_name is not None:

0 commit comments

Comments
 (0)