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
This commit is contained in:
Tom Christie 2019-01-07 14:21:39 +00:00 committed by GitHub
parent a1e9dedee0
commit 437da1c0f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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()