jenkins-bot has submitted this change and it was merged.
Change subject: code cleanup: ......................................................................
code cleanup:
- import config from pywikibot as usual - remove obsolete constructor method - single return does implicit return None
Change-Id: I3c2783ddcb1c61297b82d20c2804961da2d849ca --- M pywikibot/editor.py 1 file changed, 2 insertions(+), 4 deletions(-)
Approvals: Merlijn van Deen: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/editor.py b/pywikibot/editor.py index 450ac15..22a0d7a 100644 --- a/pywikibot/editor.py +++ b/pywikibot/editor.py @@ -17,12 +17,10 @@ import os import tempfile import pywikibot -from pywikibot import config2 as config +from pywikibot import config
class TextEditor(object): - def __init__(self): - pass
def command(self, tempFilename, text, jumpIndex=None): command = config.editor @@ -65,7 +63,7 @@
def restoreLinebreaks(self, text): if text is None: - return None + return if sys.platform == 'win32': return text.replace('\n', '\r\n') # TODO: Mac OS handling
pywikibot-commits@lists.wikimedia.org