Skip to content

Add from __future__ import annotations in even more files; remove more quotes from annotations #13412

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 15, 2022

Conversation

AlexWaygood
Copy link
Member

#13391 and #13407 missed a few spots ;)

Cc. @jhance / @cdce8p

@AlexWaygood AlexWaygood changed the title Add from __future__ import annotations in even more files; remove more quoted annotations Add from __future__ import annotations in even more files; remove more quotes from annotations Aug 14, 2022
@github-actions

This comment has been minimized.

1 similar comment
@github-actions
Copy link
Contributor

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

Copy link
Collaborator

@cdce8p cdce8p left a comment

Choose a reason for hiding this comment

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

Looks good AFAICT! Thanks for the follow up @AlexWaygood.
I left two small comments where I think a trailing comma could be useful.

@AlexWaygood
Copy link
Member Author

AlexWaygood commented Aug 14, 2022

Thanks for the review @cdce8p!

I left two small comments where I think a trailing comma could be useful.

I tried adding these, but black just strips them away again ;)

@cdce8p
Copy link
Collaborator

cdce8p commented Aug 15, 2022

I left two small comments where I think a trailing comma could be useful.

I tried adding these, but black just strips them away again ;)

Found the issue

skip-magic-trailing-comma = true

The magic-trailing-comma isn't perfect but IMO it works well enough. I would recommend to remove that setting.
https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html#the-magic-trailing-comma

@AlexWaygood
Copy link
Member Author

Found the issue

skip-magic-trailing-comma = true

Good catch! I think it was @hauntsaninja that recommended enabling that setting in the initial refactor-for-black PR.

Whatever the wisdom of that setting, however, I'm not going to change that in this PR, since it's slightly tangential to this PR's purpose :-)

@hauntsaninja hauntsaninja merged commit 1d9ca64 into python:master Aug 15, 2022
@AlexWaygood AlexWaygood deleted the future branch August 15, 2022 07:47
@hauntsaninja
Copy link
Collaborator

I don't like the magic trailing comma and I would not like that setting changed.

@cdce8p
Copy link
Collaborator

cdce8p commented Aug 15, 2022

I don't like the magic trailing comma and I would not like that setting changed.

It might not be perfect but what I like about it is it at least gives you the option to choose a better formatting if it makes sense. I opened #13418 to show the impact of removing the option.

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