Skip to content

Commit 59c437e

Browse files
committed
better plugin management
1 parent fa5b188 commit 59c437e

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

paths_cli/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
from .cli import OpenPathSamplingCLI
2+
from . import commands

paths_cli/cli.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,16 @@ def __init__(self, *args, **kwargs):
4646

4747
@staticmethod
4848
def _list_plugin_files(plugin_folders):
49+
def is_plugin(filename):
50+
return (
51+
filename.endswith(".py") and not filename.startswith("_")
52+
and not filename.startswith(".")
53+
)
54+
4955
plugin_files = []
5056
for folder in plugin_folders:
5157
files = [os.path.join(folder, f) for f in os.listdir(folder)
52-
if f.endswith(".py")]
58+
if is_plugin(f)]
5359
plugin_files += files
5460
return plugin_files
5561

paths_cli/commands/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)