Skip to content
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

Moved get_type_hints() to the 3.9 level #298

Merged
merged 1 commit into from Sep 24, 2022
Merged

Conversation

agronholm
Copy link
Contributor

This function gained an extra parameter, "include_extras", in Python 3.9, and this parameter is provided by the typing_extensions implementation.

@@ -434,7 +434,6 @@ def _fix_file(
'typing_extensions=typing:TYPE_CHECKING',
'typing_extensions=typing:Text',
'typing_extensions=typing:Type',
'typing_extensions=typing:get_type_hints',
Copy link
Owner

Choose a reason for hiding this comment

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

please read the PR I linked you to and the comment directly above this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Are you referring to a comment in the code, or a comment in the linked PR? Either way I'm not sure what you mean, but I did make one change I noticed that the linked PR did too.

Copy link
Owner

Choose a reason for hiding this comment

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

the comment in the code that says "this is generated" -- aka you shouldn't edit it manually

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've removed the changes to generated code.

@asottile
Copy link
Owner

you should change the generator, then run the generator, then put the generated code into the source

Comment on lines 471 to 476
REPLACES[(3, 11)].update((
'typing_extensions=typing:NamedTuple',
'typing_extensions=typing:TypedDict',
'typing_extensions=typing:final',
'typing_extensions=typing:overload',
))
Copy link
Owner

Choose a reason for hiding this comment

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

like the other PR -- can you remove this from the output until 3.11 final has landed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

This function gained an extra parameter, "include_extras", in Python 3.9, and this parameter is provided by the typing_extensions implementation.
Copy link
Owner

@asottile asottile left a comment

Choose a reason for hiding this comment

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

@asottile asottile merged commit 58fcb90 into asottile:main Sep 24, 2022
@agronholm agronholm deleted the patch-1 branch September 24, 2022 21:33
@agronholm
Copy link
Contributor Author

Thanks!

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.

None yet

2 participants