jenkins-bot has submitted this change and it was merged.
Change subject: Remove relative imports ......................................................................
Remove relative imports
Also re-order pywikibot imports
Change-Id: I0d6e34db4ee9a0c574250ec596a69fa837dbae0b --- M pywikibot/__init__.py M pywikibot/i18n.py M pywikibot/userinterfaces/terminal_interface.py M pywikibot/userinterfaces/terminal_interface_base.py M pywikibot/userinterfaces/terminal_interface_unix.py 5 files changed, 13 insertions(+), 11 deletions(-)
Approvals: XZise: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py index 293aa55..febe973 100644 --- a/pywikibot/__init__.py +++ b/pywikibot/__init__.py @@ -626,7 +626,7 @@ getSite = pywikibot.tools.redirect_func(Site, old_name='getSite')
-from .page import ( +from pywikibot.page import ( Page, FilePage, Category, @@ -636,7 +636,7 @@ PropertyPage, Claim, ) -from .page import html2unicode, url2unicode, unicode2html +from pywikibot.page import html2unicode, url2unicode, unicode2html
link_regex = re.compile(r'[[(?P<title>[^]|[<>{}]*)(|.*?)?]]') diff --git a/pywikibot/i18n.py b/pywikibot/i18n.py index 36f58a2..661c015 100644 --- a/pywikibot/i18n.py +++ b/pywikibot/i18n.py @@ -35,12 +35,11 @@
from collections import defaultdict
-from pywikibot import Error -from .plural import plural_rules - import pywikibot
-from . import config2 as config +from pywikibot import Error +from pywikibot import config +from pywikibot.plural import plural_rules
if sys.version_info[0] > 2: basestring = (str, ) diff --git a/pywikibot/userinterfaces/terminal_interface.py b/pywikibot/userinterfaces/terminal_interface.py index 9a5fbf1..985996b 100644 --- a/pywikibot/userinterfaces/terminal_interface.py +++ b/pywikibot/userinterfaces/terminal_interface.py @@ -16,8 +16,8 @@ import sys
if sys.platform == 'win32': - from .terminal_interface_win32 import Win32UI as UI + from pywikibot.userinterfaces.terminal_interface_win32 import Win32UI as UI else: - from .terminal_interface_unix import UnixUI as UI + from pywikibot.userinterfaces.terminal_interface_unix import UnixUI as UI
__all__ = ('UI',) diff --git a/pywikibot/userinterfaces/terminal_interface_base.py b/pywikibot/userinterfaces/terminal_interface_base.py index 66487d5..783feb3 100755 --- a/pywikibot/userinterfaces/terminal_interface_base.py +++ b/pywikibot/userinterfaces/terminal_interface_base.py @@ -15,14 +15,16 @@ import re import sys
-from . import transliteration import pywikibot + from pywikibot import config + from pywikibot.bot import VERBOSE, INFO, STDOUT, INPUT, WARNING -from pywikibot.tools import deprecated, PY2 from pywikibot.bot_choice import ( Option, OutputOption, StandardOption, ChoiceException, QuitKeyboardInterrupt, ) +from pywikibot.tools import deprecated, PY2 +from pywikibot.userinterfaces import transliteration
transliterator = transliteration.transliterator(config.console_encoding)
diff --git a/pywikibot/userinterfaces/terminal_interface_unix.py b/pywikibot/userinterfaces/terminal_interface_unix.py index b9b4ca3..43d2933 100755 --- a/pywikibot/userinterfaces/terminal_interface_unix.py +++ b/pywikibot/userinterfaces/terminal_interface_unix.py @@ -10,7 +10,8 @@ __version__ = '$Id$'
import sys -from . import terminal_interface_base + +from pywikibot.userinterfaces import terminal_interface_base
unixColors = { 'default': chr(27) + '[0m', # Unix end tag to switch back to default
pywikibot-commits@lists.wikimedia.org