Skip to content

Commit

Permalink
type: ignore type at assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
brussee committed Jan 10, 2023
1 parent aacd0bd commit 1ee3306
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion uvicorn/protocols/http/h11_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def handle_events(self) -> None:
"extensions": {},
}
if self.scheme == "https":
self.scope["extensions"]["tls"] = self.tls
self.scope["extensions"]["tls"] = self.tls # type: ignore

upgrade = self._get_upgrade()
if upgrade == b"websocket" and self._should_upgrade_to_ws():
Expand Down
2 changes: 1 addition & 1 deletion uvicorn/protocols/http/httptools_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def on_message_begin(self) -> None:
"extensions": {},
}
if self.scheme == "https":
self.scope["extensions"]["tls"] = self.tls
self.scope["extensions"]["tls"] = self.tls # type: ignore

# Parser callbacks
def on_url(self, url: bytes) -> None:
Expand Down
3 changes: 2 additions & 1 deletion uvicorn/protocols/websockets/websockets_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,8 @@ async def process_request(
"extensions": {},
}
if self.scheme == "wss":
self.scope["extensions"]["tls"] = self.tls
self.scope["extensions"]["tls"] = self.tls # type: ignore

task = self.loop.create_task(self.run_asgi())
task.add_done_callback(self.on_task_complete)
self.tasks.add(task)
Expand Down
3 changes: 2 additions & 1 deletion uvicorn/protocols/websockets/wsproto_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ def handle_connect(self, event: events.Request) -> None:
"extensions": {},
}
if self.scheme == "wss":
self.scope["extensions"]["tls"] = self.tls
self.scope["extensions"]["tls"] = self.tls # type: ignore

self.queue.put_nowait({"type": "websocket.connect"})
task = self.loop.create_task(self.run_asgi())
task.add_done_callback(self.on_task_complete)
Expand Down

0 comments on commit 1ee3306

Please sign in to comment.