Skip to content

Commit c592afe

Browse files
committed
Fix flake8 errors
1 parent 722443d commit c592afe

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

alpaca_trade_api/stream2.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,11 @@ async def _connect(self):
3131
r = r.decode('utf-8')
3232
msg = json.loads(r)
3333

34-
if not 'data' in msg or msg['data']['status'] != 'authorized':
35-
raise ValueError("Invalid Alpaca API credentials, Failed to authenticate: {}".format(msg))
34+
if 'data' not in msg or msg['data']['status'] != 'authorized':
35+
raise ValueError(
36+
("Invalid Alpaca API credentials, Failed to authenticate: {}"
37+
.format(msg))
38+
)
3639

3740
self._ws = ws
3841
await self._dispatch('authenticated', msg)

0 commit comments

Comments
 (0)