improve type annotations
This commit is contained in:
parent
a3773df853
commit
5fb229c09f
1 changed files with 3 additions and 2 deletions
|
|
@ -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:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue