jenkins-bot submitted this change.

View Change

Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
[doc] Remove Python 2 code on docs/conf.py and simplify some code parts

Change-Id: I5a65dd602638ffb34b325560867d87a8a1ac33c0
---
M docs/conf.py
1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/docs/conf.py b/docs/conf.py
index 3c4077b..fed05e1 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -15,8 +15,6 @@
#
# All configuration values have a default; values that are commented out
# serve to show the default.
-from __future__ import absolute_import, division, unicode_literals
-
import os
from os.path import abspath, dirname, join
import re
@@ -282,13 +280,11 @@
and 'Traceback (most recent call last)' not in line):
# Initiate code block except pagegenerator arguments follows
for afterline in lines[index + 1:]:
- if afterline == '':
+ if not afterline:
continue
- elif afterline == '&params;':
- break
- else:
+ if afterline != '&params;':
lines[index] = line + ':'
- break
+ break

if line.startswith('-'):
# Indent options
@@ -299,7 +295,7 @@
elif length and line.startswith(' ' * length):
# Indent descriptions of options (as options are indented)
lines[index] = ' ' + line
- elif line != '':
+ elif line:
# Reset length
length = 0


To view, visit change 628085. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I5a65dd602638ffb34b325560867d87a8a1ac33c0
Gerrit-Change-Number: 628085
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged