-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Format Attribute Expression #5259
Conversation
Current dependencies on/for this PR:
This comment was auto-generated by Graphite. |
6a52fda
to
66fcb55
Compare
PR Check ResultsEcosystem✅ ecosystem check detected no changes. BenchmarkLinux
Windows
|
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.
this will make a lot more real world code formatted
text("."), | ||
not_yet_implemented_custom_text("NOT_IMPLEMENTED_attr") | ||
trailing_comments(trailing_dot_comments), | ||
(!leading_attribute_comments.is_empty()).then_some(hard_line_break()), |
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.
oh i didn't realize write would take an option
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.
You can also pass an empty tuple. Don't know when that's useful but it's implemented ;) I even thought that Format
is implemented for FormatResult<T>
but that doesn't seem to be the case.
66fcb55
to
b224ea9
Compare
b224ea9
to
2c7d10a
Compare
Summary
This PR adds basic formatting for attribute expressions (
a.b
).Test Plan
I added a file with new attribute tests (especially around comments)