pytest-dev / pytest-dev/pytest-qt

Improvements for type annotations

Open
#610 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
455
Forks
72
Avg merge
12h 26m
Merged PRs (30d)
1

Description

  • 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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the repository's Python files, Ruff configuration, and Sphinx docstrings affected by the checklist. Review how annotations are currently written and how documentation extracts them; done means the requested annotation style and documentation handling are applied consistently across the project.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation, tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.