Alexander Shorin avatar Alexander Shorin committed 348e6d1

Use relative imports for local modules.

Comments (0)

Files changed (5)

xmppflask/ext/redis.py

 
 redis = __import__('redis')
 import json
-from xmppflask.sessions import Session, SessionInterface
+from ..sessions import Session, SessionInterface
 
 class RedisSessionInterface(SessionInterface):
     """Session interface that uses Redis as session storage.

xmppflask/ext/sleekxmpp.py

 
 import time
 
-from xmppflask.server import XmppWsgiServerInterface, maybe_unicode
+from ..server import XmppWsgiServerInterface, maybe_unicode
 
 class SleekXmppWsgiInterface(XmppWsgiServerInterface):
     """XMPPWSGI interface based on SleekXMPP library."""

xmppflask/ext/xmpppy.py

 import datetime
 import time
 
-from xmppflask.server import XmppWsgiServerInterface, maybe_unicode
+from ..server import XmppWsgiServerInterface, maybe_unicode
 
 class XmpppyWsgiInterface(XmppWsgiServerInterface):
     """XMPPWSGI interface based on xmpppy library."""

xmppflask/notification.py

     :license: BSD.
 """
 
-from xmppflask import g
+from . import g
 
 def notify(jid, message):
     g._notification_list.append((jid, message))
 import getpass
 import os
 import sys
-from xmppflask.server import XmppWsgiServer
-from xmppflask.ext.xmpppy import XmpppyWsgiInterface
-from xmppflask.ext.sleekxmpp import SleekXmppWsgiInterface
+from .server import XmppWsgiServer
+from .ext.xmpppy import XmpppyWsgiInterface
+from .ext.sleekxmpp import SleekXmppWsgiInterface
 
 _HELP = '''
 usage: %(name)s [-h] [--jid=JID] [--password=PASSWORD] [--engine=ENGINE] app
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.