lxml / lxml-stubs

Type stubs for the lxml package
Other
43 stars 29 forks source link

Fix `_Attrib` keys and values are str #99

Closed nsoranzo closed 9 months ago

nsoranzo commented 9 months ago

not _AnyStr.

>>> from lxml import etree
>>> el = etree.Element("foo", {"t_key": "t_value", b"b_key": b"b_value"})
>>> el.attrib
{'t_key': 't_value', 'b_key': 'b_value'}
>>> type(el.attrib.values()[1])
<class 'str'>
scoder commented 9 months ago

Right, return values should be strict. Thanks.