File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -59,18 +59,19 @@ def run(self) -> None:
59
59
feedback ['SettingsChange' ] = self .settings
60
60
self ._client .send (feedback )
61
61
62
+ @property
62
63
def plugin_run_dir (self ) -> Path :
63
64
"""Return the run directory of the plugin."""
64
65
return Path (sys .argv [0 ]).parent
65
66
66
67
def plugin_root_dir (self ) -> Path :
67
68
"""Return the root directory of the plugin."""
68
- current_dir = self .plugin_run_dir ()
69
+ current_dir = self .plugin_run_dir
69
70
for part in current_dir .parts :
70
71
if current_dir .joinpath (MANIFEST_FILE ).exists ():
71
72
return current_dir
72
73
current_dir = current_dir .parent
73
- raise FileNotFoundError (f"Could not find { MANIFEST_FILE } in { self .plugin_run_dir () } or any parent directory." )
74
+ raise FileNotFoundError (f"Could not find { MANIFEST_FILE } in { self .plugin_run_dir } or any parent directory." )
74
75
75
76
def manifest (self ) -> PluginManifestSchema :
76
77
"""Return the plugin manifest."""
You can’t perform that action at this time.
0 commit comments