1
0
mirror of https://github.com/HorlogeSkynet/SSHubl.git synced 2024-11-23 20:00:08 +01:00
SSHubl/main.py

47 lines
1.2 KiB
Python

import importlib
import sys
import sublime
ST_REQUIRED_MINIMUM_VERSION = 4081
for suffix in (
# constants
"paths",
# utilities
"project_data",
"ssh_utils",
"st_utils",
# controllers
"actions",
# commands and listeners (at last, as they depend on other modules)
"commands",
"listeners",
):
module = f"{__package__}.sshubl.{suffix}"
if module in sys.modules:
importlib.reload(sys.modules[module])
if int(sublime.version()) < ST_REQUIRED_MINIMUM_VERSION:
sublime.error_message(f"Sublime Text {ST_REQUIRED_MINIMUM_VERSION}+ is required !")
else:
# fmt: off
from .sshubl.commands import ( # type: ignore[import-untyped] # pylint: disable=unused-import
SshCancelForwardCommand,
SshCloseDirCommand,
SshConnectCommand,
SshConnectPasswordCommand,
SshDisconnectCommand,
SshOpenDirCommand,
SshRequestForwardCommand,
SshSelectDirCommand,
SshTerminalCommand,
)
from .sshubl.listeners import ( # type: ignore[import-untyped] # pylint: disable=unused-import
EventListener,
ViewEventListener,
plugin_loaded,
plugin_unloaded,
)
# fmt: on