From 5266fa86a1c76c304b167a280963ce70fca9cc3a Mon Sep 17 00:00:00 2001 From: adamghill Date: Sun, 28 Jul 2024 15:47:51 -0400 Subject: [PATCH] Use `Deque`. --- django_unicorn/components/unicorn_template_response.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/django_unicorn/components/unicorn_template_response.py b/django_unicorn/components/unicorn_template_response.py index eef3ebf8..eb9f3014 100644 --- a/django_unicorn/components/unicorn_template_response.py +++ b/django_unicorn/components/unicorn_template_response.py @@ -1,6 +1,7 @@ import logging import re from collections import deque +from typing import Deque import orjson from bs4 import BeautifulSoup @@ -48,7 +49,7 @@ def is_html_well_formed(html: str) -> bool: """ tag_list = re.split("(<[^>!]*>)", html)[1::2] - stack: deque[str] = deque() + stack: Deque[str] = deque() for tag in tag_list: if "/" not in tag: