improve type annotations

This commit is contained in:
Jan Petykiewicz 2024-07-29 21:50:44 -07:00
parent a3773df853
commit 5fb229c09f

View File

@ -1,4 +1,5 @@
from typing import Sequence, TextIO, cast from typing import TextIO, cast
from collections.abc import Sequence
import logging import logging
import math import math
from dataclasses import fields from dataclasses import fields
@ -15,7 +16,7 @@ class G85Error(Exception):
# Hack to directly pass through <![CDATA[...]]> # Hack to directly pass through <![CDATA[...]]>
def _escape_cdata(text): def _escape_cdata(text: str) -> str:
if text.startswith('<![CDATA[') and text.endswith(']]>'): if text.startswith('<![CDATA[') and text.endswith(']]>'):
return text return text
else: else: