Repository navigation
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? |
AlexWaygood
left a comment
There was a problem hiding this comment.
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
|
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 <diceroll123@gmail.com>
|
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 |
…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/