-
Notifications
You must be signed in to change notification settings - Fork 194
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
Proxy both parentheses in some pattern matching nodes #626
Conversation
Codecov Report
@@ Coverage Diff @@
## main #626 +/- ##
==========================================
- Coverage 94.78% 94.77% -0.01%
==========================================
Files 245 245
Lines 25256 25268 +12
==========================================
+ Hits 23940 23949 +9
- Misses 1316 1319 +3
Continue to review full report at Codecov.
|
4fdf323
to
8c095c8
Compare
8c095c8
to
5f073ca
Compare
5f073ca
to
9110754
Compare
@zsol I've been accepting all the patches coming in that fix cut-and-dry syntax bugs. Proxying is more of a LibCST internal thing so I'll leave this for you to review, unless you'd rather I do it. |
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!
@rpar.setter | ||
def rpar(self, value: Sequence[RightParen]) -> None: | ||
# pyre-fixme[41]: Cannot reassign final attribute `rpar`. | ||
self.value.rpar = value |
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.
hmm, in retrospect I think we don't need these setters, these dataclasses are frozen. I'll follow up.
Summary
This patch adds support for proxying the right parentheses to the underlying child node, so it would be consistent with the left one. Resolves #625.
Test Plan
Added a test about a case that was broken before.