jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/919790 )
Change subject: [doc] some comments for docs/conf.py ......................................................................
[doc] some comments for docs/conf.py
Change-Id: Iff6958b215b676a79b8e88f115fbdaa1d266f9aa --- M docs/conf.py 1 file changed, 20 insertions(+), 2 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/docs/conf.py b/docs/conf.py index 42e9e44..d6d1a17 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -500,7 +500,7 @@
def pywikibot_docstring_fixups(app, what, name, obj, options, lines): - """Fixup docstrings.""" + """Remove plain 'Initializer.' docstring.""" if what not in ('class', 'exception'): return
@@ -520,19 +520,27 @@
length = 0 for index, line in enumerate(lines): + # highlight the first line if index == 0: # highlight the first line lines[0] = '**{}**'.format(line.strip('.')) + + # add link for pagegenerators options elif line == '¶ms;': lines[index] = ('This script supports use of ' ':py:mod:`pagegenerators` arguments.') + + # add link for fixes elif name == 'scripts.replace' and line == '&fixes-help;': lines[index] = (' The available fixes are listed ' 'in :py:mod:`pywikibot.fixes`.') + + # replace cosmetic changes warning elif name == 'scripts.cosmetic_changes' and line == '&warning;': lines[index] = warning + + # Initiate code block except pagegenerator arguments follows elif (line.endswith(':') and not line.lstrip().startswith(':') and 'Traceback (most recent call last)' not in line): - # Initiate code block except pagegenerator arguments follows for afterline in lines[index + 1:]: if not afterline: continue @@ -540,6 +548,7 @@ lines[index] = line + ':' break
+ # adjust options if line.startswith('-'): # Indent options match = re.match(r'-[^ ]+? +', line)
pywikibot-commits@lists.wikimedia.org