Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion numpydoc/tests/test_validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -1348,7 +1348,6 @@ def test_bad_generic_functions(self, capsys, func):
assert isinstance(errors, list)
assert errors

@pytest.mark.filterwarnings("ignore::DeprecationWarning")
@pytest.mark.parametrize(
"klass,func,msgs",
[
Expand Down
4 changes: 2 additions & 2 deletions numpydoc/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,9 +521,9 @@ def get_returns_not_on_nested_functions(node):
if tree:
returns = get_returns_not_on_nested_functions(tree[0])
return_values = [r.value for r in returns]
# Replace NameConstant nodes valued None for None.
# Replace Constant nodes valued None for None.
for i, v in enumerate(return_values):
if isinstance(v, ast.NameConstant) and v.value is None:
if isinstance(v, ast.Constant) and v.value is None:
return_values[i] = None
return any(return_values)
else:
Expand Down