Skip to content

Commit 21b0be2

Browse files
Update ci_scripts/check_api_parameters.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 1e942b0 commit 21b0be2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ci_scripts/check_api_parameters.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,10 @@ def visit_FunctionDef(self, node):
146146

147147
func_node = modified_tree.body[0]
148148
params_inspec = gen_functions_args_str(func_node).split(", ")
149-
params_inspec.remove("/")
150-
params_inspec.remove("*")
149+
if "/" in params_inspec:
150+
params_inspec.remove("/")
151+
if "*" in params_inspec:
152+
params_inspec.remove("*")
151153
funcdescnode = extract_params_desc_from_rst_file(rstfilename)
152154
if funcdescnode:
153155
items = funcdescnode.children[1].children[0].children

0 commit comments

Comments
 (0)