GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-109413: libregrtest: Add and improve type annotations by AlexWaygood · Pull Request #109405 · python/cpython

Conversation

@AlexWaygood

@AlexWaygood AlexWaygood commented Sep 14, 2023 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

@vstinner, this is my attempt to create a PR with only "non-controversial" type hint changes, as you requested in #109382 (review). I'm not fully sure I understand exactly which changes you consider to be controversial, though, so apologies if there are still some changes here that you feel should be deferred to a future PR :-)

(For example: is the addition of a mypy config file in this PR okay? If not, I'm not sure how to test locally the changes I'm making here.)

This PR gets us down to 20 mypy errors if you cd into Lib/test and then run mypy --config-file libregrtest/mypy.ini.

  • Issue: libregrtest: Improve type hints; explore running mypy in CI #109413

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@AlexWaygood
libregrtest: Add and improve type annotations
86a0f2f
@AlexWaygood AlexWaygood added skip issue skip news labels Sep 14, 2023
@AlexWaygood
AlexWaygood requested a review from vstinner September 14, 2023 13:32
@AlexWaygood AlexWaygood mentioned this pull request Sep 14, 2023
Run mypy on Lib/test/libregrtest in CI #109382
Closed
AlexWaygood added 2 commits September 14, 2023 14:42
@AlexWaygood
revert another change that might be controversial
51bf677
@AlexWaygood
another
9ce367e
vstinner
vstinner reviewed Sep 14, 2023
View reviewed changes

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure that the config file without associate script is useful in the PR.

Here is a first review.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Lib/test/libregrtest/cmdline.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/libregrtest/main.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/libregrtest/results.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/libregrtest/run_workers.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/libregrtest/run_workers.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/libregrtest/run_workers.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/libregrtest/run_workers.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@AlexWaygood
Address review
ad6b96a
@AlexWaygood

AlexWaygood commented Sep 14, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

I am not sure that the config file without associate script is useful in the PR.

It can be used for local testing. You can cd into Lib/test, and then run mypy --config-file libregrtest/mypy.ini.

Without the config file, I don't know how to verify that the changes I'm making in this PR are correct. If I don't know whether the annotations I'm adding are correct or not, then I don't think there's much point in adding them.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@AlexWaygood
unbreak
28ad940
@AlexWaygood
AlexWaygood requested a review from vstinner September 14, 2023 16:17
@AlexWaygood

AlexWaygood commented Sep 14, 2023

Copy link
Copy Markdown
Member Author

It can be used for local testing. You can cd into Lib/test, and then run mypy --config-file libregrtest/mypy.ini.

Without the config file, I don't know how to verify that the changes I'm making in this PR are correct. If I don't know whether the annotations I'm adding are correct or not, then I don't think there's much point in adding them.

Though I suppose I can keep the config around locally, but not commit it in this PR, if you prefer.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@AlexWaygood
AlexWaygood marked this pull request as ready for review September 14, 2023 16:56
@bedevere-app bedevere-app Bot added the awaiting review label Sep 14, 2023
vstinner
vstinner approved these changes Sep 14, 2023
View reviewed changes

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but please keep self.testsuite_xml: list[str] = [] bug on purpose for now. The code smells, maybe something is wrong here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Lib/test/libregrtest/main.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/libregrtest/results.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot added awaiting core review and removed awaiting review labels Sep 14, 2023
@AlexWaygood AlexWaygood changed the title libregrtest: Add and improve type annotations gh-109413: libregrtest: Add and improve type annotations Sep 14, 2023
@AlexWaygood AlexWaygood added awaiting merge and removed awaiting core review skip issue labels Sep 14, 2023
@bedevere-app bedevere-app Bot mentioned this pull request Sep 14, 2023
libregrtest: Improve type hints; explore running mypy in CI #109413
Closed
@AlexWaygood
Pretend testsuite_xml is list[str] for now
f8c64ee
@AlexWaygood
AlexWaygood enabled auto-merge (squash) September 14, 2023 17:54
@AlexWaygood

AlexWaygood commented Sep 14, 2023

Copy link
Copy Markdown
Member Author

Thanks for the review @vstinner!

vstinner reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@AlexWaygood
AlexWaygood merged commit 3b9d10b into python:main Sep 14, 2023
@AlexWaygood
AlexWaygood deleted the libregrtest-type-hints branch September 14, 2023 18:33
@bedevere-app bedevere-app Bot removed the awaiting merge label Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@vstinner vstinner vstinner approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@AlexWaygood @vstinner
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.