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