Skip to content
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

Refactor: use stdlib's textwrap.shorten #34125

Merged
merged 1 commit into from
Sep 7, 2023

Conversation

eumiro
Copy link
Contributor

@eumiro eumiro commented Sep 5, 2023

This is not a 100% equivalent refactoring, but should look better in the result.

Copy link
Member

@uranusjr uranusjr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically this would make the output a bit shorter (previously the string could go as long as 114) but that’s just cosmetic.

@eumiro
Copy link
Contributor Author

eumiro commented Sep 6, 2023

Technically this would make the output a bit shorter (previously the string could go as long as 114) but that’s just cosmetic.

It also breaks the string at a word boundary. As I said, the output is not 100% identical, but hopefully better. And certainly easier to read as code.

@eumiro eumiro marked this pull request as ready for review September 6, 2023 16:42
@uranusjr uranusjr merged commit 22de77e into apache:main Sep 7, 2023
64 checks passed
@eumiro eumiro deleted the textwrap-shorten branch September 7, 2023 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants