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 2, 2024
1 parent 12145bc commit da82f29
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion example/repeatvoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,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 @@ -46,7 +46,7 @@ def load_library():
try:
if not 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 @@ -77,7 +77,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 setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import platform
from setuptools import setup


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 da82f29

Please sign in to comment.