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

Pre-commit fixes #1047

Merged
merged 3 commits into from
Jan 10, 2025
Merged

Pre-commit fixes #1047

merged 3 commits into from
Jan 10, 2025

Conversation

agateau-gg
Copy link
Collaborator

What has been done

This PR makes a few fixes in our pre-commit config:

  • Make the import-linter-config hook work on Windows.
  • Update hooks using pre-commit autoupdate (required one fix for a new error found by flake8).

Validation

  • Run pre-commit run -a, on Windows.

PR check list

  • As much as possible, the changes include tests (unit and/or functional)
  • If the changes affect the end user (new feature, behavior change, bug fix) then the PR has a changelog entry (see doc/dev/getting-started.md). If the changes do not affect the end user, then the skip-changelog label has been added to the PR.

The import-linter-config hook fails on Windows because calling a shell
script with `pdm run the_script` does not work on Windows: the shebang is
not taken into account.

Using `pdm run bash -c the_script` fix that, but then it fails because the
script itself calls ./scripts/generate-import-linter-config.py, but it does
not call it with the correct Python interpreter.

To fix that, call check-import-linter-config.sh without pdm, and make it
use `pdm run` to call generate-import-linter-config.py.
@agateau-gg agateau-gg requested a review from a team as a code owner January 8, 2025 17:06
Copy link

codecov bot commented Jan 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.10%. Comparing base (908c4c4) to head (851fcc3).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1047      +/-   ##
==========================================
+ Coverage   92.08%   92.10%   +0.01%     
==========================================
  Files         181      181              
  Lines        7762     7762              
==========================================
+ Hits         7148     7149       +1     
+ Misses        614      613       -1     
Flag Coverage Δ
unittests 92.10% <100.00%> (+0.01%) ⬆️

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.

@agateau-gg agateau-gg merged commit 28f5153 into main Jan 10, 2025
36 checks passed
@agateau-gg agateau-gg deleted the agateau/pre-commit-fixes branch January 10, 2025 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants