copier icon indicating copy to clipboard operation
copier copied to clipboard

enable stricter ruff configuration

Open danieleades opened this issue 1 year ago • 5 comments

danieleades avatar Feb 22 '25 16:02 danieleades

Codecov Report

Attention: Patch coverage is 94.44444% with 4 lines in your changes missing coverage. Please review.

Project coverage is 97.95%. Comparing base (a731d2b) to head (02a8c9c).

Files with missing lines Patch % Lines
copier/user_data.py 75.00% 1 Missing :warning:
devtasks.py 0.00% 1 Missing :warning:
tests/test_config.py 0.00% 1 Missing :warning:
tests/test_prompt.py 90.90% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1982      +/-   ##
==========================================
- Coverage   97.95%   97.95%   -0.01%     
==========================================
  Files          53       53              
  Lines        5581     5575       -6     
==========================================
- Hits         5467     5461       -6     
  Misses        114      114              
Flag Coverage Δ
unittests 97.95% <94.44%> (-0.01%) :arrow_down:

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Feb 22 '25 16:02 codecov[bot]

Thanks so much @danieleades for opening a new PR this quick 🚀

LGTM.

I'm really not a fan of E501, especially with 80-characters width, which is quite short and triggers a lot of those, but let's not address this here 👍

If you feel that way, it makes sense to increase that character limit before merging this PR since the lines will wrap differently. Do you have a specific width in mind?

danieleades avatar Feb 22 '25 17:02 danieleades

I generally use 120. Let see what other maintainers think.

pawamoy avatar Feb 22 '25 20:02 pawamoy

I have don't have a strong opinion on line length, but I tend to prefer sticking with (sane) defaults. Ruff defaults to 88. Do you feel it's a too low value?

sisp avatar Feb 26 '25 16:02 sisp

With 4-space indents, I think it's too low, yes. There are many, many strings and snippets that get split or exploded on multiple lines because we're in a condition in a loop in a method in a class, and it feels like the code get squished. But I understand why people sometimes prefer sticking to 80/88, as it makes it easier to read code side by side in multiple panes. So, no strong opinion. If none of us has strong opinions, lets keep the current line length :slightly_smiling_face:

pawamoy avatar Feb 26 '25 17:02 pawamoy