pytest-qt
pytest-qt copied to clipboard
Improvements for type annotations
- [x] Use Type Hinting Generics in Standard Collections (
list,dict,typeovertyping.Listetc.) - [ ] Use
from __future__ import annotations- [ ] Use PEP 604: New Type Union Operator, i.e.
TheType | Noneinstead ofOptional[TheType] - [ ] Use "bare" annotations for forward declarations instead of stringified ones
- [ ] Configure ruff to enforce
from __future__ import annotationson every file for consistency
- [ ] Use PEP 604: New Type Union Operator, i.e.
- [ ] Remove redundant type annotations from Sphinx docstrings (and possibly configure Sphinx to pick up the annotations, not sure what's needed for that nowadays)
Originally posted by @The-Compiler in https://github.com/pytest-dev/pytest-qt/pull/605#pullrequestreview-2937905480