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

Trailing whitespace fixes #3050

Closed
wants to merge 4 commits into from

Conversation

robinbowes
Copy link

@robinbowes robinbowes commented Jul 22, 2023

Type of changes

  • Bug fix
  • New feature
  • Documentation / docstrings
  • Tests
  • Other

Checklist

  • I've run the latest black with default args on new code.
  • I've updated CHANGELOG.md and CONTRIBUTORS.md where appropriate.
  • I've added tests for new code.
  • I accept that @willmcgugan may be pedantic in the code review.

Description

Refactor the way box characters are defined so they do not break when the trailing-whitespace pre-commit hook is used.

Fixes #3049

I found that the pre-commit hooks were failing to install with this error. Upgrading to latest version fixed the problem.

I also added the trailing-whitespace pre-commit hook.

@robinbowes
Copy link
Author

FYI, I used this search/replace regex in vim to make the substantial edit:

%s/    """\\\n\(....\)\n\(....\)\n\(....\)\n\(....\)\n\(....\)\n\(....\)\n\(....\)\n\(....\)\n"""/    "\1\\n"\r    "\2\\n"\r    "\3\\n"\r    "\4\\n"\r    "\5\\n"\r    "\6\\n"\r    "\7\\n"\r    "\8\\n"/

@codecov-commenter
Copy link

codecov-commenter commented Jul 29, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (31c1fb6) 98.31% compared to head (008e4d3) 98.31%.
Report is 30 commits behind head on master.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3050   +/-   ##
=======================================
  Coverage   98.31%   98.31%           
=======================================
  Files          74       74           
  Lines        8016     8016           
=======================================
  Hits         7881     7881           
  Misses        135      135           
Flag Coverage Δ
unittests 98.31% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
rich/box.py 100.00% <ø> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@willmcgugan
Copy link
Collaborator

Thanks for the PR. Fixed in master.

@willmcgugan willmcgugan closed this Jul 1, 2024
@robinbowes robinbowes deleted the trailing_whitespace_fixes branch July 1, 2024 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] box.py susceptible to breakage when commited with trailing-whitespace pre-commit hook
3 participants