-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
50 lines (46 loc) · 1.31 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import importlib
import sys
import sublime
ST_REQUIRED_MINIMUM_VERSION = 4081
for suffix in (
# constants
"paths",
# vendors
"vendor.mslex",
# utilities
"project_data",
"st_utils",
"ssh_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-not-found] # pylint: disable=unused-import
SshCancelForwardCommand,
SshCloseDirCommand,
SshConnectCommand,
SshConnectInteractiveCommand,
SshConnectPasswordCommand,
SshInteractiveConnectionWatcherCommand,
SshDisconnectCommand,
SshOpenDirCommand,
SshRequestForwardCommand,
SshSelectDirCommand,
SshTerminalCommand,
)
from .sshubl.listeners import ( # type: ignore[import-not-found] # pylint: disable=unused-import
EventListener,
ViewEventListener,
plugin_loaded,
plugin_unloaded,
)
# fmt: on