Skip to content
Merged

Stg #49

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion checkers/common_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ def _check_missing_returns_section(node: ast.FunctionDef | ast.AsyncFunctionDef,
list containing a style error if the Returns section is missing, or empty list otherwise
"""
errors = []
if not _has_return_or_yield_section(docstring):
if not _has_return_or_yield_section(docstring) and not (isinstance(node.returns, ast.Constant) and node.returns.value is None):
error = error_creation_module.create_error(node, 'D307', f"Function '{node.name}' missing 'Returns:' or 'Yields:' section in docstring", file_path, ignore_codes)
if error:
errors.append(error)
Expand Down
Loading