Skip to content

Remove remaining type comments in favour of PEP 526 annotations #13454

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 20, 2022

Conversation

AlexWaygood
Copy link
Member

A followup to #13427. Unlike #13427, this PR was prepared manually.

@AlexWaygood AlexWaygood requested a review from emmatyping August 19, 2022 18:51
Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

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

That PR also introduced a couple changes where code become unidiomatic for instance variables:

x = None  # type: int

should become x: int, not x: int = None.

Relatedly, I think the code in misc isn't getting type checked, and maybe it should

@AlexWaygood AlexWaygood marked this pull request as draft August 19, 2022 19:07
@AlexWaygood
Copy link
Member Author

That PR also introduced a couple changes where code become unidiomatic for instance variables

I'll take a look and fix those, thanks.

Relatedly, I think the code in misc isn't getting type checked, and maybe it should

+1

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@AlexWaygood
Copy link
Member Author

That PR also introduced a couple changes where code become unidiomatic for instance variables:

Have you got any examples in mind? The only one I can immediately see that looks quite suspicious is this one: 23ee1e7#diff-e9eee110f5e0a0409c615a1beb8092eb551338a98e6e20948361ebb44e611c16R25

And that's already been fixed in #13452

@AlexWaygood AlexWaygood marked this pull request as ready for review August 20, 2022 12:16
@github-actions
Copy link
Contributor

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

@JelleZijlstra JelleZijlstra merged commit e6a0527 into python:master Aug 20, 2022
@AlexWaygood AlexWaygood deleted the comments branch August 20, 2022 18:18
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.

4 participants