Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #539

Merged
merged 2 commits into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ repos:
- id: pyupgrade
args: [--py3-plus]
- repo: https://github.com/psf/black
rev: 24.4.0
rev: 24.4.2
hooks:
- id: black
language_version: python3
Expand Down
2 changes: 1 addition & 1 deletion modules/bhd.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ def search(self, json, path="torrents/"):
logger.debug(f"Response: {response_json}")
raise Failed(f"({response.status_code} [{response.reason}]) {response_json}")
if not response_json.get("success"):
raise Failed(f"BHD Error: {response_json.get('status_message','Issue receiving response from BHD API.')}")
raise Failed(f"BHD Error: {response_json.get('status_message', 'Issue receiving response from BHD API.')}")
return response_json
2 changes: 1 addition & 1 deletion modules/core/remove_orphaned.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def rem_orphaned(self):
body += logger.print_line("\n".join(orphaned_files), self.config.loglevel)
body += logger.print_line(
f"{'Not moving' if self.config.dry_run else 'Moving'} {num_orphaned} Orphaned files "
f"to {self.orphaned_dir.replace(self.remote_dir,self.root_dir)}",
f"to {self.orphaned_dir.replace(self.remote_dir, self.root_dir)}",
self.config.loglevel,
)

Expand Down
4 changes: 2 additions & 2 deletions modules/qbittorrent.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ def tor_delete_recycle(self, torrent, info):
if idx == 0:
backup_str += val
else:
backup_str += f" and {val.replace(info_hash,'')}"
backup_str += f" and {val.replace(info_hash, '')}"
backup_str += f" to {torrent_path}"
logger.info(backup_str)
torrent_json["tracker_torrent_files"] = tracker_torrent_files
Expand All @@ -474,7 +474,7 @@ def tor_delete_recycle(self, torrent, info):
else:
logger.print_line("\n".join(tor_files), "DEBUG")
logger.debug(
f"Moved {len(tor_files)} files to {recycle_path.replace(self.config.remote_dir,self.config.root_dir)}"
f"Moved {len(tor_files)} files to {recycle_path.replace(self.config.remote_dir, self.config.root_dir)}"
)

# Move files from torrent contents to Recycle bin
Expand Down
4 changes: 2 additions & 2 deletions qbit_manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,8 @@ def finished_run():
next_run_str = nxt_run["next_run_str"]
next_run = nxt_run["next_run"]
body = logger.separator(
f"Finished Run\n{os.linesep.join(stats_summary) if len(stats_summary)>0 else ''}"
f"\nRun Time: {run_time}\n{next_run_str if len(next_run_str)>0 else ''}".replace("\n\n", "\n").rstrip()
f"Finished Run\n{os.linesep.join(stats_summary) if len(stats_summary) > 0 else ''}"
f"\nRun Time: {run_time}\n{next_run_str if len(next_run_str) > 0 else ''}".replace("\n\n", "\n").rstrip()
)[0]
return next_run, body

Expand Down