mirror of
https://github.com/jeertmans/manim-slides.git
synced 2025-09-18 20:02:25 +08:00
chore(lib): use pathlib.Path
instead of str
(#133)
* wip(lib): change os.path to pathlib.Path * chore(lib): use pathlib.Path instead of str * fix(logger): convert Path to str * chore(lint): add type hint to prevent future errors * fix(lib): correct suffix addition
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
from pathlib import Path
|
||||
from typing import Any, Callable
|
||||
|
||||
import click
|
||||
@ -18,7 +19,7 @@ def config_path_option(function: F) -> F:
|
||||
"config_path",
|
||||
metavar="FILE",
|
||||
default=CONFIG_PATH,
|
||||
type=click.Path(dir_okay=False),
|
||||
type=click.Path(dir_okay=False, path_type=Path),
|
||||
help="Set path to configuration file.",
|
||||
show_default=True,
|
||||
)
|
||||
@ -73,7 +74,7 @@ def folder_path_option(function: F) -> F:
|
||||
"--folder",
|
||||
metavar="DIRECTORY",
|
||||
default=FOLDER_PATH,
|
||||
type=click.Path(exists=True, file_okay=False),
|
||||
type=click.Path(exists=True, file_okay=False, path_type=Path),
|
||||
help="Set slides folder.",
|
||||
show_default=True,
|
||||
)
|
||||
|
Reference in New Issue
Block a user