types-lxml
types-lxml copied to clipboard
Complete lxml external type annotation
`element: Self` is used in multiple places in the stub for `etree._Element`. Here's a typical example: https://github.com/abelcheung/types-lxml/blob/main/lxml-stubs/etree/_element.pyi#L97 This produces over-narrowing of the type when used with custom element classes, like...
### Pyre-check The support for PEP561 is new, so the current situation is still not fully evaluated. However some problems are immediately notable: - Don't understand re-exported symbols (need to...
Due to current implementation in annotation, BoolElement inherits from `int` instead of `bool` (actually `bool` is `@final` and not subclassable). This causes inconsistency like: ```python reveal_type(bool | BoolElement) -> int...
It is maintained in form of an extra patch plus alternative github workflow build steps. Closes #51.
With [`mypy` supporting JSON output](https://github.com/python/mypy/issues/10816) has materialized, it is possible to investigate whether `mypy` can be incorporated into runtime tests (that is, compare `mypy` output with `typeguard` result).
(Won't happen anytime soon, unless ditching `mypy` support right here and right now) ~With `mypy 1.11` requirement present, the time is probably ripe for support of full type parameter syntax...
This adds running [`mypy.stubtest`](https://mypy.readthedocs.io/en/stable/stubtest.html) along side the pytest tests that are being run. It can be helpful in comparing typed interfaces with runtime as well as providing context for missing...
Element() and ElementTree() were factory functions until now. They are now defined as classes. With this change, we can annotate code with the public Element class, instead of using the...
This issue tracks the progress of migrating existing runtime tests to hypothesis: - [ ] `test_elem_class_lookup.py` - [ ] `test_iterparse.py` - Depends on whether XML/HTMLPullParser options are tested or not...
Visual Studio Code has support for per-`@overload` Python docstring a while ago. This feature can serve as special notes for some specific `@overload` purpose, e.g. function argument usage that can...