Skip to content

Commit 3ac46bf

Browse files
committed
dont use builtin type
1 parent 83c4830 commit 3ac46bf

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Diff for: numpydoc/validate.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -622,8 +622,12 @@ def validate(obj_name):
622622

623623
# check param with default in sig is documented as optional
624624
for param in doc.optional_signature_parameters_names:
625-
type = doc.parameter_type(param)
626-
if "optional" not in type and "{" not in type and "default" not in type:
625+
param_type = doc.parameter_type(param)
626+
if (
627+
"optional" not in param_type
628+
and "{" not in param_type
629+
and "default" not in param_type
630+
):
627631
errs.append(error("PR11", param_name=param))
628632

629633
if doc.is_function_or_method:

0 commit comments

Comments
 (0)