From 68f944ba87eabf15489c5a93a343ca8a7f79f9c8 Mon Sep 17 00:00:00 2001 From: Archmonger <16909269+Archmonger@users.noreply.github.com> Date: Sun, 8 Sep 2024 21:54:12 -0700 Subject: [PATCH] remove overload --- src/servestatic/base.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/servestatic/base.py b/src/servestatic/base.py index a4fdca32..03869e2e 100644 --- a/src/servestatic/base.py +++ b/src/servestatic/base.py @@ -5,7 +5,7 @@ import re import warnings from posixpath import normpath -from typing import Callable, overload +from typing import Callable from wsgiref.headers import Headers from .media_types import MediaTypes @@ -18,6 +18,9 @@ class BaseServeStatic: # so we'll follow its lead FOREVER = 10 * 365 * 24 * 60 * 60 + __call__: Callable + """"Subclasses must implement `__call__`""" + def __init__( self, application, @@ -68,12 +71,6 @@ def __init__( if root is not None: self.add_files(root, prefix) - @overload - async def __call__(self, *args, **kwargs): ... - - def __call__(self, *args, **kwargs): - raise NotImplementedError("Subclasses must implement `__call__`") - def add_files(self, root, prefix=None): root = os.path.abspath(root) root = root.rstrip(os.path.sep) + os.path.sep