Skip to content

Commit

Permalink
pipx run ruff check --fix --unsafe-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss committed Nov 3, 2024
1 parent 89c3552 commit 21097a7
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion example/repeatvoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def text_to_speech(text):

def speech_to_text():
r = s.Recognizer() # an object r which recognises the voice
with s.Microphone() as source:
with s.Microphone():
# when using with statement. The with statement itself ensures proper acquisition and release of resources
print(r.recognize_google(audio))
text_to_speech(r.recognize_google(audio))
Expand Down
2 changes: 1 addition & 1 deletion pyttsx3/drivers/_espeak.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def load_library():
raise RuntimeError(
"This means you probably do not have eSpeak or eSpeak-ng installed!"
)
except Exception as exp:
except Exception:
raise

# constants and such from speak_lib.h
Expand Down
2 changes: 1 addition & 1 deletion pyttsx3/drivers/espeak.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def getProperty(name: str):
"utf-8", errors="ignore"
)
kwargs["languages"] = [language_code]
except UnicodeDecodeError as e:
except UnicodeDecodeError:
kwargs["languages"] = ["Unknown"]
genders = [None, "male", "female"]
kwargs["gender"] = genders[v.gender]
Expand Down
2 changes: 1 addition & 1 deletion pyttsx3/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def say(self, text, name=None):
notifications about this utterance.
@type name: str
"""
if text == None:
if text is None:
return "Argument value can't be none or empty"
else:
self.proxy.say(text, name)
Expand Down
1 change: 0 additions & 1 deletion tests/test_pyttsx3.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import os
import sys
from unittest import mock

Expand Down

0 comments on commit 21097a7

Please sign in to comment.