lxml / lxml-stubs

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

Fix `_Attrib` keys and values are str #99

Closed nsoranzo closed 10 months ago

nsoranzo commented 10 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 10 months ago

Right, return values should be strict. Thanks.