From 437da1c0f07714e23cfb612717a38b675de39305 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Mon, 7 Jan 2019 14:21:39 +0000 Subject: [PATCH] type of subprotocol is str, not List[str] (#308) * type of subprotocol is str, not List[str] * Force upgrade cached requirements * Attempt to force clean test re-run * Always force latest requirements --- .travis.yml | 2 +- starlette/websockets.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 37e4b708..060b3eea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,7 @@ services: - postgresql install: - - pip install -r requirements.txt + - pip install -U -r requirements.txt before_script: - psql -c 'create database starlette;' -U postgres diff --git a/starlette/websockets.py b/starlette/websockets.py index 9b9d9766..c494bc38 100644 --- a/starlette/websockets.py +++ b/starlette/websockets.py @@ -107,7 +107,7 @@ class WebSocket(HTTPConnection): else: raise RuntimeError('Cannot call "send" once a close message has been sent.') - async def accept(self, subprotocol: typing.List[str] = None) -> None: + async def accept(self, subprotocol: str = None) -> None: if self.client_state == WebSocketState.CONNECTING: # If we haven't yet seen the 'connect' message, then wait for it first. await self.receive()