Skip to content

Commit

Permalink
dont use builtin type
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewFlamm committed Sep 22, 2022
1 parent 83c4830 commit 3ac46bf
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions numpydoc/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -622,8 +622,12 @@ def validate(obj_name):

# check param with default in sig is documented as optional
for param in doc.optional_signature_parameters_names:
type = doc.parameter_type(param)
if "optional" not in type and "{" not in type and "default" not in type:
param_type = doc.parameter_type(param)
if (
"optional" not in param_type
and "{" not in param_type
and "default" not in param_type
):
errs.append(error("PR11", param_name=param))

if doc.is_function_or_method:
Expand Down

0 comments on commit 3ac46bf

Please sign in to comment.