Skip to content

Commit 923f02b

Browse files
committed
feat: xmlfile.write() supports writing CDATA object directly
Incorporated into upcoming lxml 6.0
1 parent 88586b1 commit 923f02b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/lxml-stubs/etree/_serializer.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ from .._types import (
2424
_TextArg,
2525
)
2626
from ._element import _Element
27-
from ._module_misc import LxmlError
27+
from ._module_misc import CDATA, LxmlError
2828

2929
if sys.version_info >= (3, 11):
3030
from typing import Never
@@ -184,7 +184,7 @@ class _IncrementalFileWriter:
184184
def write_doctype(self, doctype: _TextArg | None) -> None: ...
185185
def write(
186186
self,
187-
*args: str | bytes | _Element, # no bytearray
187+
*args: str | bytes | CDATA | _Element, # no bytearray
188188
with_tail: bool = True,
189189
pretty_print: bool = False,
190190
method: _OutputMethodArg | None = None,
@@ -211,7 +211,7 @@ class _AsyncIncrementalFileWriter:
211211
async def write_doctype(self, doctype: _TextArg | None) -> None: ...
212212
async def write(
213213
self,
214-
*args: str | bytes | _Element | None, # no bytearray
214+
*args: str | bytes | CDATA | _Element | None, # no bytearray
215215
with_tail: bool = True,
216216
pretty_print: bool = False,
217217
method: _OutputMethodArg | None = None,

0 commit comments

Comments
 (0)