Skip to content

Commit

Permalink
Run pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Buried-In-Code committed Jul 15, 2024
1 parent 6f80eb0 commit da400cf
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.1
rev: v0.5.2
hooks:
- id: ruff-format
- id: ruff
Expand Down
11 changes: 3 additions & 8 deletions perdoo/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,7 @@ def start(settings: Settings, force: bool = False) -> None:

metadata, metron_info, comic_info = fetch_from_services(settings=settings, details=details)
new_file = generate_filename(
root=settings.output_folder,
extension=settings.output.format.value,
metadata=metadata,
root=settings.output_folder, extension=settings.output.format.value, metadata=metadata
)
with TemporaryDirectory(prefix=f"{new_file.stem}_") as temp_str:
temp_folder = Path(temp_str)
Expand Down Expand Up @@ -359,12 +357,9 @@ def start(settings: Settings, force: bool = False) -> None:
continue
archive.path.unlink(missing_ok=True)
shutil.move(archive_file, archive.path)
if file.relative_to(settings.input_folder) != new_file.relative_to(
settings.output_folder
):
if file.relative_to(settings.input_folder) != new_file.relative_to(settings.output_folder):
LOGGER.info(
"Organizing comic, moving file to %s",
new_file.relative_to(settings.output_folder),
"Organizing comic, moving file to %s", new_file.relative_to(settings.output_folder)
)
new_file.parent.mkdir(parents=True, exist_ok=True)
shutil.move(file, new_file)
Expand Down
1 change: 1 addition & 0 deletions perdoo/models/metron_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"InformationList",
"InformationSource",
"MetronInfo",
"Page",
"Price",
"Resource",
"Role",
Expand Down
1 change: 1 addition & 0 deletions perdoo/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"Metron",
"OutputFormat",
"Output",
"Service",
"Settings",
]

Expand Down

0 comments on commit da400cf

Please sign in to comment.