From 473f9c1499b991d6d5ca3407bd70b85875dfa7cb Mon Sep 17 00:00:00 2001 From: Heiko J Schick Date: Wed, 7 Sep 2022 15:53:40 +0200 Subject: [PATCH] Changes to reduce pylint output --- tts.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tts.py b/tts.py index 4a0bdde..831903b 100644 --- a/tts.py +++ b/tts.py @@ -1,4 +1,3 @@ - """ Text-to-speech synthesis (TTS) @@ -36,8 +35,8 @@ def main(): sentences = [] # Read input file - with open(args['input'], "r", encoding="utf-8") as f: - lines = f.readlines() + with open(args['input'], "r", encoding="utf-8") as file: + lines = file.readlines() # Convert to sentences for line in lines: @@ -67,8 +66,8 @@ def main(): line = line.replace("?", "?. ") line = line.replace("(", ". ") - for x in line.split(". "): - sentences.append(x.strip()) + for sentence in line.split(". "): + sentences.append(sentence.strip()) sentences.append("") # Synthesis text