improve type hints for send_file and send_from_directory

This commit is contained in:
Grey Li 2021-05-12 22:52:25 +08:00 committed by David Lord
parent 00ee86c408
commit 702529eb9c
3 changed files with 32 additions and 22 deletions

View file

@ -288,7 +288,7 @@ class Scaffold:
self._static_url_path = value
def get_send_file_max_age(self, filename: str) -> t.Optional[int]:
def get_send_file_max_age(self, filename: t.Optional[str]) -> t.Optional[int]:
"""Used by :func:`send_file` to determine the ``max_age`` cache
value for a given file path if it wasn't passed.