This repository was archived by the owner on Jan 13, 2026. It is now read-only.
Merged
Conversation
knutwannheden
approved these changes
Dec 13, 2024
Contributor
knutwannheden
left a comment
There was a problem hiding this comment.
Apart from that small comment and the merging from main to get the parser fix, I think this looks good.
|
|
||
| from .blank_lines import BlankLinesVisitor | ||
| from .normalize_format import NormalizeFormatVisitor | ||
| from .normalize_line_breaks_visitor import NormalizeLineBreaksVisitor |
Contributor
There was a problem hiding this comment.
It looks like we still need to call the visitor.
…linebreaks-visitor
| self._stop = False | ||
| self._style = style | ||
|
|
||
| def visit_space(self, space: Optional[Space], loc: Optional[Union[PySpace.Location, Space.Location]], |
Contributor
There was a problem hiding this comment.
Also here we will need an override for visit_marker, because the base visitor class doesn't know about specific markers and thus won't visit the Space of TrailingComma.
Contributor
Author
There was a problem hiding this comment.
Should be fixed
Contributor
There was a problem hiding this comment.
Can we add a test case with a trailing comma for this visitor? I don't see the visit_marker override anywhere.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's changed?
A draft version of Normalize Line Breaks Visitor has been added, The goal of this draft PR is to gain some further suggestions for its final implementation.
What's your motivation?
Anything in particular you'd like reviewers to focus on?
Anyone you would like to review specifically?
Have you considered any alternatives or workarounds?
Any additional context
Checklist