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

the --diff option for flake8 was removed in version 6.0.0 #2317

Open
tompollard opened this issue Oct 23, 2024 · 0 comments
Open

the --diff option for flake8 was removed in version 6.0.0 #2317

tompollard opened this issue Oct 23, 2024 · 0 comments

Comments

@tompollard
Copy link
Member

Currently we use flake8 --diff in our style checks:

- name: Run code style check on changed files relative to PR base branch
if: github.event_name == 'pull_request'
run: |
git rev-parse --verify ${{ github.event.pull_request.base.sha }}
git diff -U0 ${{ github.event.pull_request.base.sha }} HEAD | \
flake8 --diff | \
perl -ne '
print; if (/^([^:]+):(\d+):(\d+):/) {
$path = $1; $line = $2; $col = $3;
open F, $path or die;
print "\n";
while (<F>) {
next if $. < $line - 2;
print " $_";
if ($. == $line) { print " " x $col . "^\n\n"; last; }
}
close F;
$status = 1;
}
END { exit $status }'

These tests are likely to start failing sometime soon, because the --diff option was removed from flake8 in version 6.0.0: https://flake8.pycqa.org/en/latest/release-notes/6.0.0.html

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

No branches or pull requests

1 participant