Skip to content

tests: fully annotate#1020

Merged
gaborbernat merged 8 commits intopypa:mainfrom
henryiii:henryiii/tests/annotate
Apr 10, 2026
Merged

tests: fully annotate#1020
gaborbernat merged 8 commits intopypa:mainfrom
henryiii:henryiii/tests/annotate

Conversation

@henryiii
Copy link
Copy Markdown
Contributor

@henryiii henryiii commented Apr 9, 2026

Description

Used copilot CLI and gpt-5-mini to add types to the test suite.

Changelog

  • Added changelog fragment: docs/changelog/<pr_number>.<type>.rst
    • Types: feature, bugfix, doc, removal, misc
    • Example: 123.feature.rst containing Add custom backend support - by :user:`yourname`

Checklist

  • Tests pass locally (tox)
  • Code follows project style (tox -e fix)
  • Type checks pass (tox -e type)
  • Documentation builds (tox -e docs)

henryiii added 5 commits April 9, 2026 18:55
… <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
@henryiii henryiii force-pushed the henryiii/tests/annotate branch from 01bd621 to c28cb4d Compare April 9, 2026 23:08
@henryiii henryiii marked this pull request as draft April 9, 2026 23:11
@henryiii henryiii force-pushed the henryiii/tests/annotate branch from c28cb4d to a8ae94f Compare April 10, 2026 00:26
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
@henryiii henryiii force-pushed the henryiii/tests/annotate branch from a8ae94f to 0a4604c Compare April 10, 2026 00:51
henryiii added 2 commits April 9, 2026 21:18
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
@henryiii henryiii marked this pull request as ready for review April 10, 2026 04:47
@layday
Copy link
Copy Markdown
Member

layday commented Apr 10, 2026

I don't think return types are necessary in the test suite except for where the type checker is unable to infer them.

Some of the parameters are underspecified, e.g. request: Any should be pytest.FixtureRequest I'm guessing?

@henryiii
Copy link
Copy Markdown
Contributor Author

henryiii commented Apr 10, 2026

The return types for tests have to be None, and this is actually something that changed in PyTest 7 or so. Having None ensures that you don’t accidentally try to return something from a test function.

I tried to clean up some of the Any, can try to see if I can get more. Yes on the FixtureRequest. I wish that fixture request was generic.

@gaborbernat gaborbernat merged commit 7827fc7 into pypa:main Apr 10, 2026
65 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants