fixup: Format Python code with Black

develop
github-actions 3 days ago
parent 1cb2d624ba
commit 6d53e8f647

@ -65,12 +65,10 @@ class AWSPolly:
sys.exit(-1)
except ProfileNotFound:
print("You need to install the AWS CLI and configure your profile")
print(
"""
print("""
Linux: https://docs.aws.amazon.com/polly/latest/dg/setup-aws-cli.html
Windows: https://docs.aws.amazon.com/polly/latest/dg/install-voice-plugin2.html
"""
)
""")
sys.exit(-1)
def randomvoice(self):

@ -27,16 +27,14 @@ from video_creation.voices import save_text_to_mp3
__VERSION__ = "3.4.0"
print(
"""
print("""
"""
)
""")
print_markdown(
"### Thanks for using this tool! Feel free to contribute to this project on GitHub! If you have any questions, feel free to join my Discord server or submit a GitHub issue. You can find solutions to many common problems in the documentation: https://reddit-video-maker-bot.netlify.app/"
)

@ -118,10 +118,8 @@ def check_toml(template_file, config_file) -> Tuple[bool, Dict]:
try:
config = toml.load(config_file)
except toml.TomlDecodeError:
console.print(
f"""[blue]Couldn't read {config_file}.
Overwrite it?(y/n)"""
)
console.print(f"""[blue]Couldn't read {config_file}.
Overwrite it?(y/n)""")
if not input().startswith("y"):
print("Unable to read config, and not allowed to overwrite it. Giving up.")
return False
@ -135,10 +133,8 @@ Overwrite it?(y/n)"""
)
return False
except FileNotFoundError:
console.print(
f"""[blue]Couldn't find {config_file}
Creating it now."""
)
console.print(f"""[blue]Couldn't find {config_file}
Creating it now.""")
try:
with open(config_file, "x") as f:
f.write("")
@ -149,16 +145,14 @@ Creating it now."""
)
return False
console.print(
"""\
console.print("""\
[blue bold]###############################
# #
# Checking TOML configuration #
# #
###############################
If you see any prompts, that means that you have unset/incorrectly set variables, please input the correct values.\
"""
)
""")
crawl(template, check_vars)
with open(config_file, "w") as f:
toml.dump(config, f)

Loading…
Cancel
Save