lxml / lxml-stubs

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

etree._Element.sourceline should have missing 'type:' #93

Open pfef-to opened 1 year ago

pfef-to commented 1 year ago

In etree.pyi:219 the type definition of sourceline is sourceline = ... # Optional[int], which gives me an error using pylance. It works when changed to sourceline = ... # type: Optional[int]

https://github.com/lxml/lxml-stubs/blob/f0290b545e2c694c66934ec36b6e77b990cceb1e/lxml-stubs/etree.pyi#L219C38-L219C38