show name in menu instead of file path
This commit is contained in:
parent
b8824f210e
commit
a41243e787
1 changed files with 6 additions and 3 deletions
|
@ -8,10 +8,13 @@ from src.constants import content_dir
|
|||
|
||||
|
||||
def choose_action():
|
||||
files = glob(f"{content_dir}/src/setup/**/*.py")
|
||||
# todo: show names instead of file names
|
||||
files = [
|
||||
s.removeprefix(f"{content_dir}/src/setup/")
|
||||
for s in files
|
||||
import_file(
|
||||
s.removeprefix(f"{content_dir}/src/setup/"),
|
||||
s,
|
||||
).name
|
||||
for s in glob(f"{content_dir}/src/setup/**/*.py")
|
||||
if "__init__.py" not in s
|
||||
]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue