Skip to content

Commit 10ce0c4

Browse files
committed
Update deprecated syntax
1 parent c9dd446 commit 10ce0c4

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

django_renderpdf/helpers.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import mimetypes
22
from typing import IO
3-
from typing import List
43
from typing import Optional
54
from typing import Union
65

@@ -93,7 +92,7 @@ def django_url_fetcher(url: str):
9392

9493

9594
def render_pdf(
96-
template: Union[List[str], str],
95+
template: Union[list[str], str],
9796
file_: IO,
9897
url_fetcher=django_url_fetcher,
9998
context: Optional[dict] = None,

django_renderpdf/views.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from typing import List
21
from typing import Optional
32

43
from django.core.exceptions import ImproperlyConfigured
@@ -103,7 +102,7 @@ def get_download_name(self) -> str:
103102
)
104103
return self.download_name
105104

106-
def get_template_names(self) -> List[str]:
105+
def get_template_names(self) -> list[str]:
107106
"""Return a list of template names to be used for the request.
108107
109108
Must return a list. By default, just returns ``[self.template_name]``.

0 commit comments

Comments
 (0)