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: use more ruff rules and replace pyupgrade and pygrep-hooks usages #276

Merged
merged 8 commits into from
Jan 23, 2023

Conversation

mkniewallner
Copy link
Collaborator

@mkniewallner mkniewallner commented Jan 22, 2023

PR Checklist

  • A description of the changes is added to the description of this PR.
  • If there is a related issue, make sure it is linked to this PR.
  • If you've fixed a bug or added code that should be tested, add tests!
  • Documentation in docs is updated

Description of changes

Use ruff to replace pyupgrade (almost all rules are implemented) and pygrep-hooks (the only rule we use is implemented, the other are either nice to have, or should not cause any harm).

Also enable more rules that would be nice to have in the codebase, but feel free to tell me if you disagree with some:

@mkniewallner mkniewallner marked this pull request as ready for review January 22, 2023 20:30
@codecov-commenter
Copy link

Codecov Report

Merging #276 (c952501) into main (176a093) will decrease coverage by 0.1%.
The diff coverage is 100.0%.

@@           Coverage Diff           @@
##            main    #276     +/-   ##
=======================================
- Coverage   95.7%   95.7%   -0.1%     
=======================================
  Files         32      32             
  Lines        918     915      -3     
  Branches     191     191             
=======================================
- Hits         879     876      -3     
  Misses        26      26             
  Partials      13      13             
Impacted Files Coverage Δ
deptry/dependency.py 91.2% <100.0%> (ø)
deptry/dependency_specification_detector.py 100.0% <100.0%> (ø)
deptry/module.py 98.6% <100.0%> (ø)

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

Comment on lines -22 to -23
# Respect `exclude` and `extend-exclude` settings.
args: ["--force-exclude"]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

--force-exclude is now included by default in the pre-commit configuration, so we can remove it.

@mkniewallner mkniewallner merged commit 1a9e1fa into fpgmaas:main Jan 23, 2023
@mkniewallner mkniewallner deleted the chore/use-more-ruff-rules branch January 23, 2023 15:38
@mkniewallner mkniewallner mentioned this pull request Jan 24, 2023
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