Skip to content
This repository was archived by the owner on Feb 2, 2024. It is now read-only.

Commit 7766524

Browse files
committed
apiref_generator.py coding style fixes
1 parent 07cb565 commit 7766524

5 files changed

Lines changed: 5 additions & 6 deletions

File tree

-154 Bytes
Binary file not shown.
Binary file not shown.
-10.1 KB
Binary file not shown.
Binary file not shown.

docs/source/buildscripts/apiref_generator.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import pandas
2929
from sdc_object_utils import init_pandas_structure, init_sdc_structure, init_pandas_sdc_dict, get_sdc_object, get_obj
3030
from sdc_object_utils import get_class_methods, get_class_attributes, get_fully_qualified_name
31-
from sdc_doc_utils import is_sdc_user_guide_header, get_indent, reindent,get_short_description
31+
from sdc_doc_utils import is_sdc_user_guide_header, get_indent, reindent, get_short_description
3232
from sdc_doc_utils import split_in_sections, get_docstring, create_heading_str, cut_sdc_dev_guide
3333
import os
3434

@@ -43,7 +43,7 @@ def reformat(text):
4343
:param text: Original text with warnings
4444
:return: Modified text that fixes warnings
4545
"""
46-
text = reformat_replace_star_list_with_dash_list(text) # Must be called before :func:`reformat_asterisks`
46+
text = reformat_replace_star_list_with_dash_list(text) # Must be called before :func:`reformat_asterisks`
4747
text = reformat_asterisks(text) # Fix for * and ** symbols
4848
text = reformat_explicit_markup(text) # Fix for explicit markup without a blank line
4949
text = reformat_bullet_list(text) # Fix bullet list indentation issues
@@ -214,7 +214,7 @@ def reformat_asterisks(text):
214214
if idx2 == -1:
215215
# Only one single asterisk in the line - Reformat to `\*`
216216
line = line.replace('*', '\\*')
217-
idx = len(line) # Parsed the line. Go to another line
217+
idx = len(line) # Parsed the line. Go to another line
218218
elif idx2 == idx1+1:
219219
# First double asterisk met in the line
220220
idx2 = line.find('**', idx1+2)
@@ -278,7 +278,6 @@ def _get_param_text(title, param):
278278
elif title == 'Raises':
279279
return ':raises:'
280280

281-
282281
# Internal function. Returns correct markup for Parameters section
283282
def _reformat_parameters(title, text):
284283
lines = text.split('\n')
@@ -608,15 +607,15 @@ def parse_templ_rst(fname_templ):
608607
doc.pop(0) # Skipping ``.. sdc_toctree``
609608

610609
# Parsing the list of APIs
611-
while len(doc) >0 and doc[0].strip() != '':
610+
while len(doc) > 0 and doc[0].strip() != '':
612611
line = doc[0]
613612
indent = get_indent(line)
614613
line = line.strip()
615614
full_name = current_module_name + '.' + line
616615
obj = get_obj(full_name)
617616
short_description = generate_simple_object_doc(obj, short_doc_flag=True).strip()
618617
new_line = reindent(':ref:`', indent) + line + ' <' + full_name + '>`\n' + \
619-
reindent(short_description, indent+4) + '\n'
618+
reindent(short_description, indent+4) + '\n'
620619
fout.write(new_line)
621620
doc.pop(0)
622621

0 commit comments

Comments
 (0)