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

[build] replaces flake8 with ruff #1179

Merged
merged 4 commits into from
Apr 24, 2023
Merged

Conversation

felixT2K
Copy link
Contributor

@felixT2K felixT2K commented Apr 20, 2023

This PR:

Benefits:

  • config compatible with pyproject.toml
  • much faster as flake8

@felixdittrich92 felixdittrich92 added this to the 0.6.1 milestone Apr 20, 2023
@felixdittrich92 felixdittrich92 added type: enhancement Improvement topic: build Related to dependencies and build topic: ci Related to CI labels Apr 20, 2023
@codecov
Copy link

codecov bot commented Apr 20, 2023

Codecov Report

Merging #1179 (1b3248f) into main (70ff4fd) will decrease coverage by 0.02%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1179      +/-   ##
==========================================
- Coverage   95.01%   94.99%   -0.02%     
==========================================
  Files         149      149              
  Lines        6417     6417              
==========================================
- Hits         6097     6096       -1     
- Misses        320      321       +1     
Flag Coverage Δ
unittests 94.99% <ø> (-0.02%) ⬇️

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

see 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Collaborator

@frgfm frgfm left a comment

Choose a reason for hiding this comment

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

Thanks a lot @felixT2K 🙏

Two high-level comments:

  • loving the suggestion to switch to ruff, I fully agree with that. I only added a few comments to make sure we have no regression from flake8 previous config
  • for the rest, everything is on point, but let's make one objective per PR and focus that one on ruff if that's ok 😃

.github/workflows/style.yml Show resolved Hide resolved
docs/build.sh Outdated Show resolved Hide resolved
doctr/version.py Outdated Show resolved Hide resolved
pyproject.toml Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
@felixT2K
Copy link
Contributor Author

felixT2K commented Apr 20, 2023

@frgfm Do you think it would make sense to add pre-commit also ? :)
(I personally like it one of my current colleagues hates it like hell 😂 )
I was so free to merge this minor stuff directly in #1180 think that's fine

ruff finished in 6sec 💪🏼 -> ❤️ rust

Copy link
Collaborator

@frgfm frgfm left a comment

Choose a reason for hiding this comment

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

Nice, thanks for the migration Felix 👍
(I just noticed @felixdittrich92 & @felixT2K are the same haha)

"flake8>=3.9.0",
"ruff>=0.0.260",
Copy link
Collaborator

Choose a reason for hiding this comment

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

out of security, I would have added an upper bound as well 0.1.0 for instance to avoid troubles with the CI later but nothing major 👍

@felixdittrich92
Copy link
Contributor

Nice, thanks for the migration Felix 👍 (I just noticed @felixdittrich92 & @felixT2K are the same haha)

Yeah it's my work profile 😅

@felixdittrich92 felixdittrich92 merged commit 23a00e1 into mindee:main Apr 24, 2023
@felixT2K felixT2K deleted the flake8-to-ruff branch April 24, 2023 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: build Related to dependencies and build topic: ci Related to CI type: enhancement Improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants