Skip to content

Commit

Permalink
fix flake8 warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
phoenixthrush committed Nov 19, 2024
1 parent 06bd36f commit 8fcc370
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 10 deletions.
7 changes: 5 additions & 2 deletions src/aniworld/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,9 +300,12 @@ def on_ok(self):
selected_urls = [self.episode_map[episode]
for episode in selected_episodes]
selected_str = "\n".join(selected_episodes)

logging.debug("Selected URLs: %s", selected_urls)
npyscreen.notify_confirm(f"Selected episodes:\n{
selected_str}", title="Selection")
npyscreen.notify_confirm(
f"Selected episodes:\n{selected_str}",
title="Selection"
)

if not self.directory_field.hidden:
anime_title = format_anime_title(self.parentApp.anime_slug)
Expand Down
4 changes: 2 additions & 2 deletions src/aniworld/common/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ def check_dependencies(dependencies: list) -> None:
download_dependencies(missing)
else:
missing_with_links = [
f"{dep} (Download: {download_links.get(
dep, 'No link available')})"
f"{dep} (Download: "
f"{download_links.get(dep, 'No link available')})"
for dep in missing
]
logging.critical(
Expand Down
5 changes: 3 additions & 2 deletions src/aniworld/execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ def providers(soup: BeautifulSoup) -> Dict[str, Dict[int, str]]:
provider_name = provider.find('h4').text.strip()
if provider_name not in extracted_data:
extracted_data[provider_name] = {}
extracted_data[provider_name][lang_key] = f"https://aniworld.to{
redirect_link}"
extracted_data[provider_name][lang_key] = (
f"https://aniworld.to{redirect_link}"
)
logging.debug("Extracted provider data: %s", extracted_data)
return extracted_data
except AttributeError:
Expand Down
5 changes: 3 additions & 2 deletions src/aniworld/extractors/nhentai/nhentai.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,9 @@ def nhentai(link: str = None):
if not link:
print(COLORS['clear'], end='')
source = get_input(
f"{COLORS['pink']
}Please provide the image id for any doujin image (E.g. 234781)."
f"{COLORS['pink']}"
f"Please provide the image id for any doujin image "
f"(E.g. 234781)."
)
folder = get_input(
f"{COLORS['pink']}What should the output folder be called?"
Expand Down
6 changes: 4 additions & 2 deletions tests/test_aniworld.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,10 @@ def test_main(args):
)
return result.stdout
except subprocess.CalledProcessError as e:
print(f"Command '{
e.cmd}' returned non-zero exit status {e.returncode}.")
print(
f"Command '{e.cmd}' "
f"returned non-zero exit status {e.returncode}."
)
print(f"Error output: {e.stderr}")
raise

Expand Down

0 comments on commit 8fcc370

Please sign in to comment.