-
Notifications
You must be signed in to change notification settings - Fork 307
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
DAOS-16865 cq: update flake8 to 7.1.1 #15575
Conversation
Update flake8 to 7.1.1. Adjust githook to work with newer flake8. Also tested to be backwards compatible with flake8<6 Skip-build: true Required-githooks: true Signed-off-by: Dalton Bohning <[email protected]>
Ticket title is 'githooks: support flake8>6' |
if flake8 --version | grep ^6\\.; then | ||
echo "flake8 >= 6.x does not have the --diff option. Skipping." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check is needed for platforms not managing the CQ dependencies with pip
, that might be stuck at 6.0.0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It isn't needed anymore because I made the githook work with newer and older versions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I specifically did not want to break backwards compat so I verified the hook still works with python 3.6 + flake<6 (what we use today) and python3.9 + flake 7.1.1 (what this PR updates to)
|
||
# non-scons | ||
git diff "$TARGET" -U10 | flake8 --config .flake8 --diff | ||
if ! echo "$py_files" | grep -vi scons | xargs flake8 --config .flake8; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@brianjmurrell The idea is instead of using the --diff
option, we pipe the files to flake agnostically
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahhh. I see.
|
||
# non-scons | ||
git diff "$TARGET" -U10 | flake8 --config .flake8 --diff | ||
if ! echo "$py_files" | grep -vi scons | xargs flake8 --config .flake8; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahhh. I see.
Update flake8 to 7.1.1. Adjust githook to work with newer flake8. Also tested to be backwards compatible with flake8<6 Skip-build: true Required-githooks: true Signed-off-by: Dalton Bohning <[email protected]>
Update flake8 to 7.1.1. Adjust githook to work with newer flake8. Also tested to be backwards compatible with flake8<6 Signed-off-by: Dalton Bohning <[email protected]>
Update flake8 to 7.1.1.
Adjust githook to work with newer flake8.
Also tested to be backwards compatible with flake8<6
Skip-build: true
Required-githooks: true
Before requesting gatekeeper:
Features:
(orTest-tag*
) commit pragma was used or there is a reason documented that there are no appropriate tags for this PR.Gatekeeper: