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

Lint Python code with ruff #2359

Merged
merged 2 commits into from
Feb 19, 2025
Merged

Lint Python code with ruff #2359

merged 2 commits into from
Feb 19, 2025

Conversation

cclauss
Copy link
Contributor

@cclauss cclauss commented Feb 10, 2025

As suggested at #2353 (review) let's add the ruff linter.

Copy link

codecov bot commented Feb 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.16%. Comparing base (6f29cb9) to head (1502a96).
Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2359   +/-   ##
=======================================
  Coverage   99.16%   99.16%           
=======================================
  Files          40       40           
  Lines        3101     3101           
  Branches      680      680           
=======================================
  Hits         3075     3075           
  Misses         15       15           
  Partials       11       11           

Copy link
Member

@DanielNoord DanielNoord left a comment

Choose a reason for hiding this comment

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

Thanks! One question about the ignores

@cclauss
Copy link
Contributor Author

cclauss commented Feb 12, 2025

The fact that DeepSource: Python disagrees with both flake8 and ruff what code complexity is does not help the review process.

@staticdev
Copy link
Collaborator

@cclauss @DanielNoord to be honest, I am not very familiar with DeepSource, it was there since forever. Not sure it is a modern solution anymore. Does any of you have opinions on it already?

@cclauss cclauss requested a review from staticdev February 14, 2025 09:16
@cclauss
Copy link
Contributor Author

cclauss commented Feb 14, 2025

I'm not a fan of DeepSource for Python (I find it silent but then opaque) but I hear it is quite useful for other languages.

@DanielNoord
Copy link
Member

I would also be okay with removing it!

Copy link
Member

@DanielNoord DanielNoord left a comment

Choose a reason for hiding this comment

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

I would probably open an issue for the follow up on the ignores, but other than that LGTM!

@cclauss cclauss force-pushed the ruff branch 2 times, most recently from 05c67e6 to ccff6bf Compare February 15, 2025 07:25
@cclauss
Copy link
Contributor Author

cclauss commented Feb 16, 2025

@staticdev
Copy link
Collaborator

@cclauss after the other merges, this one needs a manual rebase.

Copy link
Member

@DanielNoord DanielNoord left a comment

Choose a reason for hiding this comment

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

Still LGTM!

Thanks @cclauss

@cclauss
Copy link
Contributor Author

cclauss commented Feb 18, 2025

What up with the Windows tests?

@DanielNoord
Copy link
Member

A broken test added in #2331

You're not having a lot of luck with this PR, sorry!

I'll leave it to @staticdev to decide how they want to resolve this.

@cclauss cclauss force-pushed the ruff branch 3 times, most recently from 1ebf17c to a9ff147 Compare February 18, 2025 23:32
@DanielNoord DanielNoord added this pull request to the merge queue Feb 19, 2025
Merged via the queue into PyCQA:main with commit 1157b58 Feb 19, 2025
16 of 21 checks passed
@cclauss cclauss deleted the ruff branch February 19, 2025 09:16
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.

3 participants