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 — Update Unused and __exit__ parameters in stdlib by Avasam · Pull Request #9519 · python/typeshed

Conversation

@Avasam

@Avasam Avasam commented Jan 13, 2023 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Collaborator

Follow up to #9475

  • Use of Unused type alias for unused params.
  • Removed an allowlist entry uuid.getnode by correctly typing an undocumented/unused param
  • Properly(?) typed asyncio.runners.Runner.__exit__ and sqlite3.dbapi2.Blob.__exit__ using type[BaseException] | None, BaseException | None, TracebackType | None instead of objects. I couldn't check the source for these two, so I'm not sure if the params are meant to be unsued.

There's also 4 object | None in stdlib, should I change those to object as well?

Sorry, something went wrong.

Uh oh!

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

All reactions
@Avasam
Update Unused and __exit__ parameters in stdlib
54bf91d
@github-actions

This comment has been minimized.

Sign in to view
@Avasam

Avasam commented Jan 13, 2023

Copy link
Copy Markdown
Collaborator Author

Random CI failure, you can re-run just that job

AlexWaygood 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 commented Jan 13, 2023

Copy link
Copy Markdown
Member

Hmm, while support for arbitrary aliases in flake8-pyi is unrealistic, we could certainly add some special-casing for the _typeshed.Unused alias specifically. I think I'd prefer to do that rather than add a bajillion # noqa comments :)

Avasam 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 commented Jan 13, 2023

Copy link
Copy Markdown
Member

Hmm, while support for arbitrary aliases in flake8-pyi is unrealistic, we could certainly add some special-casing for the _typeshed.Unused alias specifically. I think I'd prefer to do that rather than add a bajillion # noqa comments :)

Are you interested in working on a flake8-pyi PR for this? If not, I can take a look at adding special-casing

All reactions

Sorry, something went wrong.

Uh oh!

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

@Avasam

Avasam commented Jan 14, 2023

Copy link
Copy Markdown
Collaborator Author

Are you interested in working on a flake8-pyi PR for this? If not, I can take a look at adding special-casing

Sure. If I"m stuck I"ll let you know

AlexWaygood reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

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

@Avasam Avasam mentioned this pull request Jan 14, 2023
Special-case object alias _typeshed.Unused PyCQA/flake8-pyi#320
Merged
@AlexWaygood
Merge branch 'main' into unused-param-stdlib
6f4423d
@github-actions

This comment has been minimized.

Sign in to view
Avasam added 2 commits January 16, 2023 15:35
@Avasam
Merge branch 'main' of https://github.com/python/typeshed into unused…
d87cd6e
…-param-stdlib
@Avasam
remove # noqa: Y036
41e1893
AlexWaygood
AlexWaygood reviewed Jan 17, 2023
View reviewed changes

@AlexWaygood AlexWaygood 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.

Mostly looks good, but a few points below! Also, you have a fair few unused noqa comments following the new flake8-pyi release ;)

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread stdlib/asyncio/runners.pyi Resolved

Uh oh!

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

Comment thread stdlib/sqlite3/dbapi2.pyi Resolved

Uh oh!

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

Comment thread stdlib/sqlite3/dbapi2.pyi Resolved

Uh oh!

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

Avasam added 2 commits January 17, 2023 10:03
@Avasam
PR comments
57ff67c
@Avasam
Merge branch 'unused-param-stdlib' of https://github.com/Avasam/typeshed
4bab47e
 into unused-param-stdlib
@Avasam

Avasam commented Jan 17, 2023 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Collaborator Author

Thanks for looking into the methods I was uncertain about.

I still have one unanswered question left:

There's also 4 object | None in stdlib, should I change those to object as well?

All reactions

Sorry, something went wrong.

Uh oh!

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

@github-actions

This comment has been minimized.

Sign in to view
@AlexWaygood

AlexWaygood commented Jan 17, 2023

Copy link
Copy Markdown
Member

I still have one unanswered question left:

There's also 4 object | None in stdlib, should I change those to object as well?

Sure, why not!

All reactions

Sorry, something went wrong.

Uh oh!

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

@Avasam
object | None
9a589ba
@Avasam
Avasam requested a review from AlexWaygood January 17, 2023 15:25
@github-actions

github-actions Bot commented Jan 17, 2023

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

All reactions

Sorry, something went wrong.

Uh oh!

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

AlexWaygood
AlexWaygood approved these changes Jan 17, 2023
View reviewed changes

@AlexWaygood AlexWaygood 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.

Thanks!

Sorry, something went wrong.

Uh oh!

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

All reactions
@AlexWaygood
AlexWaygood merged commit c70d303 into python:main Jan 17, 2023
@Avasam
Avasam deleted the unused-param-stdlib branch January 17, 2023 15:41
This was referenced Feb 9, 2023
Update __exit__ parameters in stubs #9696
Merged
Update Unused parameters in stubs/ #9704
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@AlexWaygood AlexWaygood AlexWaygood approved these changes

Uh oh!

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

Assignees

No one assigned

Labels

None yet

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

@Avasam @AlexWaygood
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.