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

chore: replace black, fake8 and isort with ruff and ruff-format #249

Merged
merged 4 commits into from
Jan 6, 2024

Conversation

gruebel
Copy link
Member

@gruebel gruebel commented Dec 28, 2023

This PR

  • replace black, flake8 and isort with ruff and ruff-format
  • enabled the rules, which replace flake8 and the plugins you mentioned in the pre-commit config
  • additionally enabled some more, which I used in an other project, but feel free to enable more, if something peaks your interest 🙂
  • adjusted GHA to use the pre-commit action instead

Related Issues

Fixes #219

Notes

Follow-up Tasks

How to test

@gruebel
Copy link
Member Author

gruebel commented Dec 28, 2023

hey @federicobond and @beeme1mr created a new PR, which only does the ruff addition. Will do the code adjustments in a follow-up PR.

Copy link

codecov bot commented Dec 28, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (ab50012) 93.45% compared to head (4d236ab) 93.45%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #249   +/-   ##
=======================================
  Coverage   93.45%   93.45%           
=======================================
  Files          16       16           
  Lines         443      443           
=======================================
  Hits          414      414           
  Misses         29       29           
Flag Coverage Δ
unittests 93.45% <ø> (ø)

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.

@beeme1mr
Copy link
Member

beeme1mr commented Jan 2, 2024

Hey @gruebel, sorry for the delay here. Most of the team was out for the holidays. Things should speed up now that people are coming back 😄

@gruebel
Copy link
Member Author

gruebel commented Jan 2, 2024

@beeme1mr no problem 😄 Fixed the issue with the missing GHA version tag. It looks like they don't offer a shortened variant for it. I usually use commit hashes to pin all GHA versions. Are you interested in it or you want to keep it as is?

@beeme1mr
Copy link
Member

beeme1mr commented Jan 2, 2024

@beeme1mr no problem 😄 Fixed the issue with the missing GHA version tag. It looks like they don't offer a shortened variant for it. I usually use commit hashes to pin all GHA versions. Are you interested in it or you want to keep it as is?

I have a slight preference for version tags because they're easier to understand at a glance but I would be fine with either approach.

@gruebel
Copy link
Member Author

gruebel commented Jan 2, 2024

I have a slight preference for version tags because they're easier to understand at a glance but I would be fine with either approach.

All good, then let's keep as it is 🙂

@beeme1mr
Copy link
Member

beeme1mr commented Jan 2, 2024

I'll give @federicobond more time since he's our resident Python expert 😄

@federicobond
Copy link
Member

Sorry for the delay! I think this is good to merge. It's hard to understand all the implications of moving to a new set of style rules, but this moves us in the right direction regarding tooling, and if it turns out we need to fine-tune the config we can adjust it later.

@beeme1mr beeme1mr merged commit 3b6204d into open-feature:main Jan 6, 2024
12 checks passed
@gruebel gruebel deleted the add-ruff-v2 branch January 6, 2024 11:11
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.

Consider migrating from flake8/isort to ruff
3 participants