Skip to content

Commit

Permalink
Add more linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Tmaster055 committed Nov 17, 2024
1 parent f00c98d commit f4ac018
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 39 deletions.
21 changes: 12 additions & 9 deletions src/aniworld/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,15 +575,17 @@ def parse_arguments():
args.provider = aniworld_globals.DEFAULT_PROVIDER_WATCH

if args.version:
update_status = " (Update Available)" if is_version_outdated() else ""
divider = "-------------------" if is_version_outdated() else ""
banner = fR"""
____________________________________{"___________________" if is_version_outdated() else ""}
< Installed aniworld{get_version()} via {check_package_installation()}{" (Update Available)" if is_version_outdated() else ""}. >
------------------------------------{"-------------------" if is_version_outdated() else ""}
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
____________________________________{divider}
< Installed aniworld {get_version()} via {check_package_installation()}{update_status}. >
------------------------------------{divider}
\\ ^__^
\\ (oo)\\_______
(__)\\ )\\/\\
||----w |
|| ||
"""

print(banner)
Expand Down Expand Up @@ -623,7 +625,8 @@ def parse_arguments():
logging.error("Failed to start tailing the log file: %s", e)
elif platform.system() == "Windows":
try:
command = 'start cmd /c "powershell -NoExit -c Get-Content -Wait \\"$env:TEMP\\aniworld.log\\""'
command = ('start cmd /c "powershell -NoExit -c Get-Content '
'-Wait \\"$env:TEMP\\aniworld.log\\""')
subprocess.Popen(command, shell=True)
logging.debug("Started tailing the log file in a new Terminal window.")
except subprocess.CalledProcessError as e:
Expand Down
24 changes: 0 additions & 24 deletions src/aniworld/common/adventure.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,30 +75,6 @@ def display_ascii_art():


def adventure():
try:
import ollama # pylint: disable=import-error
except ModuleNotFoundError:
clear_screen()
print(display_ascii_art())
print("The 'ollama' module is required to start the adventure. "
"Please install it and try again.")
return

clear_screen()

# doesn't make sense because menu only runs this game when offline lol
# try:
# if is_online():
# print("Downloading llama3.2 model if not already installed.")
# print("This might take a while.")
# ollama.pull('llama3.2')
# except ResponseError:
# pass

play()


def play():
try:
import ollama # pylint: disable=import-error
except ModuleNotFoundError:
Expand Down
4 changes: 2 additions & 2 deletions src/aniworld/extractors/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
from .provider.vidoza import vidoza_get_direct_link
from .provider.voe import voe_get_direct_link

from .nhentai.nhentai import main
from .streamkiste.streamkiste import main
from .nhentai.nhentai import nhentai
from .streamkiste.streamkiste import streamkiste
4 changes: 2 additions & 2 deletions src/aniworld/extractors/nhentai/nhentai.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def fetch_image_base_url(gallery_id):
return None


def main():
def nhentai():
try:
print(COLORS['clear'], end='')
source = get_input(f"{COLORS['pink']}"
Expand All @@ -112,4 +112,4 @@ def main():


if __name__ == '__main__':
main()
nhentai()
4 changes: 2 additions & 2 deletions src/aniworld/extractors/streamkiste/streamkiste.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def streamkiste_get_direct_link(link: str):
return fetch_direct_link(link)


def main():
def streamkiste():
try:
clear_screen()
link = input("Enter the StreamKisteTV link: ")
Expand All @@ -128,4 +128,4 @@ def main():


if __name__ == "__main__":
main()
streamkiste()

0 comments on commit f4ac018

Please sign in to comment.