Permalink
Browse files

use relative imports everywhere to avoid more of Python's BS

depending on how you import a module, it might be imported multiple times
leading to strange bugs if the module needs initialisation or is otherwise stateful
  • Loading branch information...
DisposaBoy
DisposaBoy committed Feb 1, 2018
1 parent 257f749 commit 2d0daa62bbc3a0765ac8664ae957e4c8b4eb05a3
Showing with 42 additions and 42 deletions.
  1. +8 −8 GoSublime.py
  2. +1 −1 gosubl/gs.py
  3. +1 −1 gosubl/gspatch.py
  4. +1 −1 gosubl/gsq.py
  5. +2 −2 gosubl/gsshell.py
  6. +5 −5 gosubl/mg9.py
  7. +6 −6 gs9o.py
  8. +3 −3 gscommands.py
  9. +2 −2 gscomplete.py
  10. +3 −3 gsdoc.py
  11. +1 −1 gsev.py
  12. +4 −4 gslint.py
  13. +3 −3 gspalette.py
  14. +2 −2 gstest.py
@@ -22,10 +22,10 @@
print("GoSublime: %s" % execErr)
def loadable_mods():
from gosubl import gs
from gosubl import sh
from gosubl import margo
from gosubl import mg9
from .gosubl import gs
from .gosubl import sh
from .gosubl import margo
from .gosubl import mg9
return [
('gs', gs),
@@ -35,10 +35,10 @@ def loadable_mods():
]
def plugin_loaded():
from gosubl import about
from gosubl import sh
from gosubl import ev
from gosubl import gs
from .gosubl import about
from .gosubl import sh
from .gosubl import ev
from .gosubl import gs
if VERSION != about.VERSION:
gs.show_output('GoSublime-main', '\n'.join([
@@ -1,7 +1,7 @@
# Sublime modelines - https://github.com/SublimeText/Modelines
# sublime: translate_tabs_to_spaces false; rulers [100,120]
from gosubl import about
from . import about
from subprocess import Popen, PIPE
import copy
import datetime
@@ -1,4 +1,4 @@
from gosubl import gs
from . import gs
import sublime
import sys
@@ -1,4 +1,4 @@
from gosubl import gs
from . import gs
import sublime
import threading
@@ -1,5 +1,5 @@
from gosubl import gs
from gosubl import sh
from . import gs
from . import sh
import hashlib
import os
import re
@@ -1,8 +1,8 @@
from gosubl import about
from gosubl import ev
from gosubl import gs
from gosubl import gsq
from gosubl import sh
from . import about
from . import ev
from . import gs
from . import gsq
from . import sh
import atexit
import base64
import glob
12 gs9o.py
@@ -1,9 +1,9 @@
from gosubl import about
from gosubl import gs
from gosubl import gsq
from gosubl import gsshell
from gosubl import mg9
from gosubl import sh
from .gosubl import about
from .gosubl import gs
from .gosubl import gsq
from .gosubl import gsshell
from .gosubl import mg9
from .gosubl import sh
import datetime
import json
import os
@@ -1,6 +1,6 @@
from gosubl import gs
from gosubl import gspatch
from gosubl import mg9
from .gosubl import gs
from .gosubl import gspatch
from .gosubl import mg9
import datetime
import os
import sublime
@@ -1,5 +1,5 @@
from gosubl import gs
from gosubl import mg9
from .gosubl import gs
from .gosubl import mg9
from os.path import basename
from os.path import dirname
import json
@@ -1,6 +1,6 @@
from gosubl import gs
from gosubl import gsq
from gosubl import mg9
from .gosubl import gs
from .gosubl import gsq
from .gosubl import mg9
import os
import re
import sublime
@@ -1,4 +1,4 @@
from gosubl import gs
from .gosubl import gs
from . import gstest
import sublime
import sublime_plugin
@@ -1,7 +1,7 @@
from gosubl import gs
from gosubl import gsq
from gosubl import gsshell
from gosubl import mg9
from .gosubl import gs
from .gosubl import gsq
from .gosubl import gsshell
from .gosubl import mg9
import os
import re
import sublime
@@ -1,6 +1,6 @@
from gosubl import gs
from gosubl import gspatch
from gosubl import mg9
from .gosubl import gs
from .gosubl import gspatch
from .gosubl import mg9
from os.path import dirname, basename, relpath
from . import gslint
import re
@@ -1,5 +1,5 @@
from gosubl import gs
from gosubl import mg9
from .gosubl import gs
from .gosubl import mg9
import os
import re
import sublime

0 comments on commit 2d0daa6

Please sign in to comment.