Variance of generics in typing-full fixture

Open
#3,826 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
devtools, testing

Research direction

Start with the typing-full.pyi test fixture and compare its generic variances with the corresponding definitions in typeshed. Review PR #3132 for context and check the affected tests. Done means the fixture reflects actual typeshed variances without introducing test regressions.

Written by the indexing model from the issue text.

Description

needs discussion priority-1-normal topic-protocols topic-tests

Currently, vast majority of generics in typing-full.pyi test fixture are defined as invariant. Probably, it makes sense to make them match the actual variances in typeshed.

This appeared in the context of PR #3132 as this could affect some tests.

Dominant language
Python
Stars
20.6k
Forks
3.3k
Avg merge
1d 18h
Merged PRs (30d)
54

Contributor guide

Open the contributing guide

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.

More from python/mypy

All issues in python/mypy

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.