aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkongr45gpen <electrovesta@gmail.com>2021-05-30 23:07:39 +0300
committerkongr45gpen <electrovesta@gmail.com>2021-05-30 23:07:39 +0300
commit7b2bc1384615ce7956d81620ffc16bf2938849bd (patch)
tree6752fa13287cdd4214bbd67ea8630db0eae3e0af
parent9c4c04fb59efff1c1daaaf1959ee2857f29f95f9 (diff)
downloadsupybot_github-7b2bc1384615ce7956d81620ffc16bf2938849bd.tar.gz
supybot_github-7b2bc1384615ce7956d81620ffc16bf2938849bd.tar.bz2
supybot_github-7b2bc1384615ce7956d81620ffc16bf2938849bd.zip
Modernise module import for python 3
-rw-r--r--.gitignore5
-rw-r--r--__init__.py45
-rw-r--r--plugin.py6
-rw-r--r--test.py2
4 files changed, 31 insertions, 27 deletions
diff --git a/.gitignore b/.gitignore
index f1643b8..7bbb4a8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,9 @@
+# Plugin files
+/cmpr
+/requests
+
*.py[cod]
+*.bak
# C extensions
*.so
diff --git a/__init__.py b/__init__.py
index 6c6d12b..9ad6847 100644
--- a/__init__.py
+++ b/__init__.py
@@ -23,31 +23,31 @@ __contributors__ = {}
__url__ = 'https://github.com/kongr45gpen/supybot-github'
-from . import config
-from . import plugin
+import config
+import plugin
from imp import reload
reload(plugin) # In case we're being reloaded.
# Add more reloads here if you add third-party modules and want them to be
# reloaded when this plugin is reloaded. Don't forget to import them as well!
-from .local import globals
-from .local import utility
-from .local.handler import GithubHandler as RequestHandler
-from .local.handler import PingHandler
-from .local.handler import PushHandler
-from .local.handler import WikiHandler
-from .local.handler import IssueHandler
-from .local.handler import StatusHandler
-from .local.handler import TravisHandler
-from .local.handler import MessageHandler
-from .local.handler import NetlifyHandler
-from .local.handler import ReleaseHandler
-from .local.handler import UnknownHandler
-from .local.handler import AppVeyorHandler
-from .local.handler import CreateDeleteHandler
-from .local.handler import IssueCommentHandler
-from .local.theme import Theme
-from .local.theme import DefaultTheme
-from .local.theme import CompactTheme
+from local import globals
+from local import utility
+from local.handler import GithubHandler as RequestHandler
+from local.handler import PingHandler
+from local.handler import PushHandler
+from local.handler import WikiHandler
+from local.handler import IssueHandler
+from local.handler import StatusHandler
+from local.handler import TravisHandler
+from local.handler import MessageHandler
+from local.handler import NetlifyHandler
+from local.handler import ReleaseHandler
+from local.handler import UnknownHandler
+from local.handler import AppVeyorHandler
+from local.handler import CreateDeleteHandler
+from local.handler import IssueCommentHandler
+from local.theme import Theme
+from local.theme import DefaultTheme
+from local.theme import CompactTheme
reload(globals)
reload(utility)
reload(RequestHandler)
@@ -71,10 +71,9 @@ reload(CompactTheme)
globals.init()
if world.testing:
- from . import test
+ import test
Class = plugin.Class
configure = config.configure
-
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:
diff --git a/plugin.py b/plugin.py
index e5010c9..27b28cf 100644
--- a/plugin.py
+++ b/plugin.py
@@ -46,9 +46,9 @@ import supybot.ircutils as ircutils
import supybot.registry as registry
import supybot.callbacks as callbacks
-from .local import globals
-from .local.handler import GithubHandler as RequestHandler
-from .local import utility as Utility
+from local import globals
+from local.handler import GithubHandler as RequestHandler
+from local import utility as Utility
from imp import reload
diff --git a/test.py b/test.py
index 89298e3..67aa1f4 100644
--- a/test.py
+++ b/test.py
@@ -2,7 +2,7 @@
from supybot.log import info
from supybot.test import *
-from .local.testing.ExpectationPluginTestCase import *
+from local.testing.ExpectationPluginTestCase import *
class GithubTestCase(ExpectationPluginTestCase):
plugins = ('Github',)

© 2014-2024 Faster IT GmbH | imprint | privacy policy