diff --git a/_config.py b/_config.py index 3ea5f05..f04842f 100644 --- a/_config.py +++ b/_config.py @@ -31,8 +31,8 @@ def __init_subclass__(cls, **kwargs): DEBUG: bool = False TESTING: bool = False - # BASE_DIR = os.path.dirname(os.path.abspath(__file__)) - BASE_DIR: str = os.path.abspath(os.path.dirname(__file__)) + BASE_DIR = os.path.dirname(os.path.abspath(__file__)) + # BASE_DIR: str = os.path.abspath(os.path.dirname(__file__)) sys.path.insert(0, BASE_DIR) LOG_DIR: str = os.path.join(BASE_DIR, "logs") os.makedirs(LOG_DIR, exist_ok=True) diff --git a/models.py b/models.py index 4579566..083a377 100644 --- a/models.py +++ b/models.py @@ -14,8 +14,7 @@ import sublime -from api import Simplenote - +from .api import Simplenote from .utils.decorator import class_property from .utils.tree.redblacktree import rbtree as RedBlackTree diff --git a/operations.py b/operations.py index 68ceb8c..b116437 100644 --- a/operations.py +++ b/operations.py @@ -6,9 +6,8 @@ import sublime -from gui import SIMPLENOTE_BASE_DIR, SIMPLENOTE_SETTINGS_FILE, _show_message, open_view, remove_status -from models import Note - +from .gui import SIMPLENOTE_BASE_DIR, SIMPLENOTE_SETTINGS_FILE, _show_message, open_view, remove_status +from .models import Note from .utils.patterns.singleton.base import Singleton diff --git a/simplenote.py b/simplenote.py index b98b1bf..7d8bb4a 100644 --- a/simplenote.py +++ b/simplenote.py @@ -8,9 +8,8 @@ # https://www.sublimetext.com/docs/api_reference.html import sublime -from gui import close_view, open_view -from models import SIMPLENOTE_NOTES_DIR, Note - +from .gui import close_view, open_view +from .models import SIMPLENOTE_NOTES_DIR, Note from .utils.patterns.singleton.base import Singleton diff --git a/simplenotecommands.py b/simplenotecommands.py index 4ff2402..5431a68 100644 --- a/simplenotecommands.py +++ b/simplenotecommands.py @@ -7,10 +7,10 @@ import sublime import sublime_plugin -from gui import SIMPLENOTE_PACKAGE_DIR, SIMPLENOTE_SETTINGS_FILE, close_view, open_view, remove_status, show_message -from models import Note -from operations import NoteCreator, NoteDeleter, NotesIndicator, NoteUpdater, OperationManager -from simplenote import clear_orphaned_filepaths, on_note_changed +from .gui import SIMPLENOTE_BASE_DIR, SIMPLENOTE_SETTINGS_FILE, close_view, open_view, remove_status, show_message +from .models import Note +from .operations import NoteCreator, NoteDeleter, NotesIndicator, NoteUpdater, OperationManager +from .simplenote import clear_orphaned_filepaths, on_note_changed __all__ = [ @@ -251,8 +251,7 @@ def start(): sync() SIMPLENOTE_STARTED = True else: - filepath = os.path.join(SIMPLENOTE_PACKAGE_DIR, SIMPLENOTE_SETTINGS_FILE) - sublime.active_window().open_file(filepath) + sublime.active_window().open_file(os.path.join(SIMPLENOTE_BASE_DIR, SIMPLENOTE_SETTINGS_FILE)) show_message("Simplenote: Please configure username/password") sublime.set_timeout(remove_status, 2000) SIMPLENOTE_STARTED = False