Skip to content

Commit

Permalink
Fix flake8 rules
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikolay Nikolov committed Apr 22, 2020
1 parent 6f84af4 commit 6b5a15e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion skyscanner/skyscanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def configure_logger(log_level=logging.WARN):
logger.addHandler(sa)
return logger


log = configure_logger()
STRICT, GRACEFUL, IGNORE = 'strict', 'graceful', 'ignore'

Expand Down Expand Up @@ -92,7 +93,7 @@ def __init__(self, api_key, response_format='json'):
if response_format.lower() not in self._SUPPORTED_FORMATS:
raise ValueError(
'Unknown response format: {}'.format(response_format) +
', supported formats are '.format(
+ ', supported formats are '.format(
', '.join(self._SUPPORTED_FORMATS)
)
)
Expand Down
5 changes: 3 additions & 2 deletions tests/test_skyscanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,8 @@ def test_default_resp_callback_xml(self):
t._default_resp_callback,
FakeResponse(content='invalid XML')
)
except:
self.assertRaises(Exception,
except Exception as e:
self.assertRaises(e,
t._default_resp_callback,
FakeResponse(content='invalid XML')
)
Expand Down Expand Up @@ -840,5 +840,6 @@ def test_get_result_xml(self):
self.assertTrue(
len(self.result.findall('./Itineraries/ItineraryApiDto')) > 0)


if __name__ == '__main__':
unittest.main()

0 comments on commit 6b5a15e

Please sign in to comment.