Skip to content

Commit f98560c

Browse files
committed
Remove redundant name from methods
1 parent df225b9 commit f98560c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pyflowlauncher/plugin.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -60,21 +60,21 @@ def run(self) -> None:
6060
self._client.send(feedback)
6161

6262
@property
63-
def plugin_run_dir(self) -> Path:
63+
def run_dir(self) -> Path:
6464
"""Return the run directory of the plugin."""
6565
return Path(sys.argv[0]).parent
6666

67-
def plugin_root_dir(self) -> Path:
67+
def root_dir(self) -> Path:
6868
"""Return the root directory of the plugin."""
69-
current_dir = self.plugin_run_dir
69+
current_dir = self.run_dir
7070
for part in current_dir.parts:
7171
if current_dir.joinpath(MANIFEST_FILE).exists():
7272
return current_dir
7373
current_dir = current_dir.parent
74-
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.run_dir} or any parent directory.")
7575

7676
def manifest(self) -> PluginManifestSchema:
7777
"""Return the plugin manifest."""
78-
with open(self.plugin_root_dir() / MANIFEST_FILE, 'r', encoding='utf-8') as f:
78+
with open(self.root_dir() / MANIFEST_FILE, 'r', encoding='utf-8') as f:
7979
manifest = json.load(f)
8080
return manifest

0 commit comments

Comments
 (0)