diff --git a/integration_tests/test_authentication.py b/integration_tests/test_authentication.py index 92983bfee..34a33f608 100644 --- a/integration_tests/test_authentication.py +++ b/integration_tests/test_authentication.py @@ -22,7 +22,6 @@ def test_invalid_authentication_token(session, function_type: str): assert r.headers.get("WWW-Authenticate") == "BearerGetter" - @pytest.mark.benchmark @pytest.mark.parametrize("function_type", ["sync", "async"]) def test_invalid_authentication_header(session, function_type: str): diff --git a/robyn/__init__.py b/robyn/__init__.py index efb50d251..5c95a97c7 100644 --- a/robyn/__init__.py +++ b/robyn/__init__.py @@ -15,18 +15,9 @@ from robyn.logger import logger from robyn.processpool import run_processes from robyn.responses import serve_file, serve_html -from robyn.robyn import ( - FunctionInfo, - HttpMethod, - Request, - Response, - get_version, - jsonify, - WebSocketConnector, - Headers -) +from robyn.robyn import FunctionInfo, HttpMethod, Request, Response, get_version, jsonify, WebSocketConnector, Headers from robyn.router import MiddlewareRouter, MiddlewareType, Router, WebSocketRouter -from robyn.types import Directory, Header +from robyn.types import Directory from robyn import status_codes from robyn.ws import WebSocket diff --git a/robyn/authentication.py b/robyn/authentication.py index 8cd4bd988..785121b75 100644 --- a/robyn/authentication.py +++ b/robyn/authentication.py @@ -79,8 +79,8 @@ class BearerGetter(TokenGetter): @classmethod def get_token(cls, request: Request) -> Optional[str]: - if request.headers.contains("authorization") : - authorization_header = request.headers.get("authorization") + if request.headers.contains("authorization"): + authorization_header = request.headers.get("authorization") else: authorization_header = None diff --git a/robyn/processpool.py b/robyn/processpool.py index 265f31d0b..6e0042d58 100644 --- a/robyn/processpool.py +++ b/robyn/processpool.py @@ -9,7 +9,7 @@ from robyn.events import Events from robyn.robyn import FunctionInfo, Headers, Server, SocketHeld from robyn.router import GlobalMiddleware, RouteMiddleware, Route -from robyn.types import Directory, Header +from robyn.types import Directory from robyn.ws import WebSocket diff --git a/robyn/robyn.pyi b/robyn/robyn.pyi index a261d7c80..31007e1ba 100644 --- a/robyn/robyn.pyi +++ b/robyn/robyn.pyi @@ -61,10 +61,6 @@ class Url: class Identity: claims: dict[str, str] - - - - @dataclass class QueryParams: """ @@ -156,11 +152,9 @@ class QueryParams: pass class Headers: - def __init__(self, default_headers: Optional[dict]) -> None: pass - def set(self, key: str, value: str) -> None: """ Sets the value of the header with the given key. @@ -191,11 +185,9 @@ class Headers: """ pass - def is_empty(self) -> bool: pass - @dataclass class Request: """ diff --git a/robyn/router.py b/robyn/router.py index 28217fb6d..b76e2ce64 100644 --- a/robyn/router.py +++ b/robyn/router.py @@ -10,7 +10,6 @@ from robyn import status_codes from robyn.ws import WebSocket -from robyn.types import Header class Route(NamedTuple): @@ -59,7 +58,6 @@ def _format_response( if not headers.contains("Content-Type"): headers.set("Content-Type", "text/plain") - description = res.get("description", "") if not isinstance(status_code, int): @@ -94,7 +92,6 @@ def add_route( is_const: bool, exception_handler: Optional[Callable], ) -> Union[Callable, CoroutineType]: - @wraps(handler) async def async_inner_handler(*args): try: