-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
Clarify ast docs to use a less confusing example for ast.ParamSpec
#127955
Conversation
What is the pyright error? Since this is valid syntax, maybe it's something for pyright to fix instead? |
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! I agree this example is less confusing if the type alias definition passed as the string to ast.parse()
is one that type checkers would accept if it were in user code
ast.ParamSpec
Thanks @diceroll123 for the PR, and @AlexWaygood for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12. |
Thanks @diceroll123 for the PR, and @AlexWaygood for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. |
Sorry, @diceroll123 and @AlexWaygood, I could not cleanly backport this to
|
…ythonGH-127955) Fix typo in ast docs: ParamSpec defaults (cherry picked from commit 7900a85) Co-authored-by: Steve C <[email protected]>
GH-127959 is a backport of this pull request to the 3.13 branch. |
Oh, it's not relevant for 3.12 because ParamSpec defaults are new in 3.13 |
…mSpec` (GH-127955) (#127959) Clarify ast docs to use a less confusing example for `ast.ParamSpec` (GH-127955) Fix typo in ast docs: ParamSpec defaults (cherry picked from commit 7900a85) Co-authored-by: Steve C <[email protected]>
…ython#127955) Fix typo in ast docs: ParamSpec defaults
Fixes a syntactical typo. The syntax is valid and works fine at runtime, but I noticed that pyright was nitpicky about it.
📚 Documentation preview 📚: https://cpython-previews--127955.org.readthedocs.build/