minor code cleanup

This commit is contained in:
AJ Slater 2024-02-21 21:16:03 -08:00
parent 0d2fd4b9d2
commit 4f42e0afad
2 changed files with 6 additions and 4 deletions

View File

@ -337,6 +337,7 @@ class ComicFilenameParser:
self._path_indexes: dict[str, int] = {} self._path_indexes: dict[str, int] = {}
def comicfn2dict(path: str | Path): def comicfn2dict(path: str | Path, verbose: int = 0):
"""Simple API.""" """Simple API."""
return ComicFilenameParser(path).parse() parser = ComicFilenameParser(path, verbose=verbose)
return parser.parse()

View File

@ -112,6 +112,7 @@ class ComicFilenameSerializer:
self._debug: bool = bool(verbose) self._debug: bool = bool(verbose)
def dict2comicfn(md: Mapping, ext: bool = True) -> str: def dict2comicfn(md: Mapping, ext: bool = True, verbose: int = 0) -> str:
"""Simple API.""" """Simple API."""
return ComicFilenameSerializer(md, ext=ext).serialize() serializer = ComicFilenameSerializer(md, ext=ext, verbose=verbose)
return serializer.serialize()