From 07dc28bf42e29929f84236647cbef7e04befba55 Mon Sep 17 00:00:00 2001 From: Larry Ogrodnek Date: Thu, 16 May 2024 23:14:58 -0400 Subject: [PATCH] fix auth type --- pyproject.toml | 3 ++- pyview/auth/required.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 2d1e50b..0b0de4c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ packages = [ { include = "pyview" }, ] -version = "0.0.8a" +version = "0.0.9a" description = "LiveView in Python" authors = ["Larry Ogrodnek "] license = "MIT" @@ -72,6 +72,7 @@ build-backend = "poetry.core.masonry.api" [tool.pyright] exclude = [ ".venv", + "examples/.venv", "**/vendor", "**/node_modules", "**/__pycache__", diff --git a/pyview/auth/required.py b/pyview/auth/required.py index 853a86b..96b3201 100644 --- a/pyview/auth/required.py +++ b/pyview/auth/required.py @@ -25,7 +25,7 @@ def wrap( ) -> typing.Callable[_P, typing.Any]: return starlette_requires(self.scopes, self.status_code, self.redirect)(func) - def has_required_auth(self, websocket: WebSocket) -> bool: + async def has_required_auth(self, websocket: WebSocket) -> bool: return has_required_scope(websocket, self.scopes)