diff options
Diffstat (limited to 'src/jinja2/utils.py')
-rw-r--r-- | src/jinja2/utils.py | 6 |
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": |