Update dynamic_text
builder doc comment
#6978
Merged
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.
This PR adds a little more detail to
dynamic_text
's documentation.This isn't really necessary since I'm sure 'dynamic' implies this logic in some way that I'm not familiar with yet, but I'm always looking for even subtle improvements to help the next reader.
Since I didn't read the implementation I failed to realize that this builder allocates a new string -- which would have influenced my decision using it for some use cases. See #6901 (comment) for more context.
Idk if this is just me, but I tend to start out by running
cargo doc -p ruff_formatter --open
to gain some familiarity with the project (I should start using thesource
button in addition to reading the documentation lol :)).