Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
pfef-to opened this issue Oct 24, 2023 · 0 comments · May be fixed by #104
Open

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

pfef-to opened this issue Oct 24, 2023 · 0 comments · May be fixed by #104

Comments

@pfef-to
Copy link

pfef-to commented Oct 24, 2023

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

ejm added a commit to ejm/lxml-stubs that referenced this issue Apr 13, 2025
This resolves lxml#93 by correctly defining the type of `Element_.sourceline`

Thanks!
@ejm ejm linked a pull request Apr 13, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant