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

use ruff formatter #24

Merged
merged 2 commits into from
Nov 27, 2024
Merged

use ruff formatter #24

merged 2 commits into from
Nov 27, 2024

Conversation

robamu
Copy link
Contributor

@robamu robamu commented Nov 27, 2024

@sgaisser There is an issue formatting a certain line below the 120 line width with ruff.. any ideas? maybe some conflict with a lint?

@robamu robamu requested a review from sgaisser November 27, 2024 09:49
@robamu
Copy link
Contributor Author

robamu commented Nov 27, 2024

From the docs:

While the line-too-long (E501) rule can be used alongside the formatter, the formatter only makes a best-effort attempt to wrap lines at the configured line-length. As such, formatted code may exceed the line length, leading to line-too-long (E501) errors.

I suppose I just disable it for that one line

Copy link

codecov bot commented Nov 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.06%. Comparing base (15f2025) to head (a2c8342).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #24   +/-   ##
=======================================
  Coverage   98.06%   98.06%           
=======================================
  Files          13       13           
  Lines        1548     1548           
=======================================
  Hits         1518     1518           
  Misses         30       30           
Flag Coverage Δ
unittests 98.06% <ø> (ø)

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

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

@robamu robamu removed the request for review from sgaisser November 27, 2024 10:38
@robamu robamu merged commit 4d84e8b into main Nov 27, 2024
10 checks passed
@robamu robamu deleted the use-ruff-format branch November 27, 2024 10:38
@sgaisser
Copy link
Contributor

sgaisser commented Nov 27, 2024

@sgaisser There is an issue formatting a certain line below the 120 line width with ruff.. any ideas? maybe some conflict with a lint?

Ah you've found it already.

@@ -84,6 +84,8 @@ ignore = [
"N818", # Exception names should end in "Error", requires API change
"S101", # Use of assert, should be changed in the future
"ANN204", # Do not use return typing on __init__, __new__ and __call__ methods
"E111", # Recommended to be disabled when using the ruff formatter
Copy link
Contributor

Choose a reason for hiding this comment

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

Interesting, never had any issues with those rules before but I guess I have never used a non-standard indent.

@robamu robamu modified the milestones: vNext, v0.4.0 Nov 27, 2024
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.

2 participants