Skip to content

Commit 786a908

Browse files
Fixes for flake8
1 parent 7fdb462 commit 786a908

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

connect/config.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ def __init__(
2626
"""
2727
# Check arguments
2828
if not file and not any([api_key, api_url]):
29-
raise ValueError('Filename or api_key and api_url are expected in Config initialization')
29+
raise ValueError('Filename or api_key and api_url are expected'
30+
'in Config initialization')
3031
if products and not isinstance(products, (str, list)):
3132
raise TypeError('Products can be string or string list. Found type '
3233
+ type(products).__name__)
@@ -50,7 +51,9 @@ def __init__(
5051
configs.get('products', ''))
5152
api_url = api_url.encode('utf-8') if not isinstance(api_url, str) else api_url
5253
api_key = api_key.encode('utf-8') if not isinstance(api_key, str) else api_key
53-
products = products.encode('utf-8') if not isinstance(products, (str, list)) else products
54+
products = products.encode('utf-8') \
55+
if not isinstance(products, (str, list)) \
56+
else products
5457

5558
# Initialize
5659
self._api_key = api_key

0 commit comments

Comments
 (0)