Skip to content

Commit 645d3a8

Browse files
committed
Fix flake8 violations
1 parent 8707b83 commit 645d3a8

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ install:
2121
- pip install flake8 rstcheck
2222
- pip install -e .
2323
script:
24-
- flake8 --ignore=E501,E701 speech_recognition tests examples setup.py # ignore errors for long lines and multi-statement lines
24+
- flake8 --ignore=E501,E701,W504 speech_recognition tests examples setup.py # ignore errors for long lines and multi-statement lines
2525
- rstcheck README.rst reference/*.rst # ensure RST is well-formed
2626
- python -m unittest discover --verbose # run unit tests
2727
sudo: false # this allows TravisCI to use the fast Docker build environment rather than the slower VMs

speech_recognition/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,7 @@ def recognize_sphinx(self, audio_data, language="en-US", keyword_entries=None, g
831831
fsg = FsgModel(fsg_path, decoder.get_logmath(), 7.5)
832832
decoder.set_fsg(grammar_name, fsg)
833833
decoder.set_search(grammar_name)
834-
834+
835835
decoder.start_utt() # begin utterance processing
836836
decoder.process_raw(raw_data, False, True) # process audio data with recognition enabled (no_search = False), as a full utterance (full_utt = True)
837837
decoder.end_utt() # stop utterance processing
@@ -957,7 +957,7 @@ def recognize_google_cloud(self, audio_data, credentials_json=None, language="en
957957
phrases=preferred_phrases
958958
)]
959959
if show_all:
960-
config['enableWordTimeOffsets'] = True # some useful extra options for when we want all the output
960+
config['enableWordTimeOffsets'] = True # some useful extra options for when we want all the output
961961

962962
opts = {}
963963
if self.operation_timeout and socket.getdefaulttimeout() is None:

tests/test_special_features.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
class TestSpecialFeatures(unittest.TestCase):
1111
def setUp(self):
1212
self.AUDIO_FILE_EN = os.path.join(os.path.dirname(os.path.realpath(__file__)), "english.wav")
13-
self.addTypeEqualityFunc(str,self.assertSameWords)
13+
self.addTypeEqualityFunc(str, self.assertSameWords)
1414

1515
def test_sphinx_keywords(self):
1616
r = sr.Recognizer()

0 commit comments

Comments
 (0)