summaryrefslogtreecommitdiff
path: root/src/jinja2/utils.py
diff options
context:
space:
mode:
authorDavid Lord <davidism@gmail.com>2023-01-19 18:22:50 -0800
committerGitHub <noreply@github.com>2023-01-19 18:22:50 -0800
commit05a5f8120a62f2e1da322131c632be2ba8d969fc (patch)
tree842087b49f88a8764206336c7a21fc55f7335af2 /src/jinja2/utils.py
parent048a06869755877d173ec1ee4ea226139788d34c (diff)
parent8ed8e1d0eda956aa0cdc6e216270be3ebcfd4b4a (diff)
downloadjinja2-05a5f8120a62f2e1da322131c632be2ba8d969fc.tar.gz
switch to pyproject.toml (#1793)
Diffstat (limited to 'src/jinja2/utils.py')
-rw-r--r--src/jinja2/utils.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/jinja2/utils.py b/src/jinja2/utils.py
index 9b5f5a5..852d082 100644
--- a/src/jinja2/utils.py
+++ b/src/jinja2/utils.py
@@ -152,7 +152,7 @@ def import_string(import_name: str, silent: bool = False) -> t.Any:
raise
-def open_if_exists(filename: str, mode: str = "rb") -> t.Optional[t.IO]:
+def open_if_exists(filename: str, mode: str = "rb") -> t.Optional[t.IO[t.Any]]:
"""Returns a file descriptor for the filename if that file exists,
otherwise ``None``.
"""
@@ -450,7 +450,9 @@ class LRUCache:
self.__dict__.update(d)
self._postinit()
- def __getnewargs__(self) -> t.Tuple:
+ def __getnewargs__(
+ self,
+ ) -> t.Tuple[int,]:
return (self.capacity,)
def copy(self) -> "LRUCache":