Skip to content

Commit dbd23df

Browse files
authored
Fix minor doc bot issue (6 lines) (pyccel#1871)
This PR ensures that numpydoc tests are run on `_wrap_X` functions and makes minor improvements to the associated file by using f-strings instead of join.
1 parent 7f0de97 commit dbd23df

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

ci_tools/list_docs_tovalidate.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@ def should_ignore(name):
3333
#ignore _print_ methods in the codegen.printing module
3434
if 'Printer._print_' in name:
3535
return True
36-
#ignore _wrap_ methods in the codegen.wrapper module
37-
if 'Wrapper._wrap_' in name:
38-
return True
3936
return False
4037

4138
if __name__ == '__main__':
@@ -81,16 +78,16 @@ def should_ignore(name):
8178
# inside a function or a class is updated to include
8279
# the name of the parent object.
8380
if isinstance(node, (FunctionDef, ClassDef)):
84-
if should_ignore('.'.join([prefix, node.name])):
81+
if should_ignore(f'{prefix}.{node.name}'):
8582
continue
8683
if any((node.lineno <= x <= node.end_lineno
8784
for x in line_nos)):
88-
objects.append('.'.join([prefix, node.name]))
85+
objects.append(f'{prefix}.{node.name}')
8986
if isinstance(node, ClassDef):
9087
obj_pref = node.name
9188
for child in node.body:
9289
if isinstance(child, (FunctionDef, ClassDef)):
93-
child.name = '.'.join([obj_pref, child.name])
90+
child.name = f'{obj_pref}.{child.name}'
9491
to_visit.append(child)
9592

9693
for obj in objects:

0 commit comments

Comments
 (0)