pytest-qt icon indicating copy to clipboard operation
pytest-qt copied to clipboard

Improvements for type annotations

Open The-Compiler opened this issue 6 months ago • 0 comments

  • [x] Use Type Hinting Generics in Standard Collections (list, dict, type over typing.List etc.)
  • [ ] Use from __future__ import annotations
    • [ ] Use PEP 604: New Type Union Operator, i.e. TheType | None instead of Optional[TheType]
    • [ ] Use "bare" annotations for forward declarations instead of stringified ones
    • [ ] Configure ruff to enforce from __future__ import annotations on every file for consistency
  • [ ] 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

The-Compiler avatar Jun 25 '25 09:06 The-Compiler