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

introduce autoflake #78

Merged
merged 2 commits into from
Aug 2, 2021
Merged

Conversation

ibesso-rh
Copy link
Contributor

@ibesso-rh ibesso-rh commented Aug 1, 2021

Short description:

introduce autoflake pre-commit hook.

More details:

followed this reference to integrate via pre-commit:
PyCQA/autoflake#62

What this PR does / why we need it:

autoflake complements flake8 for removing unused imports
because flake8 just reports them and fails the pre-commit

Which issue(s) this PR fixes:
Special notes for reviewer:

Note that applying pre-commit on all files causes the following code to be modified:

class ValueMismatch(Exception):
"""
Raises when value doesn't match the class value
"""

pass

the "pass" is redundant, and therefore, removed.

It's fine by me, but on another repo where I introduced autoflake that applied the same modification, you did not want this to be modified, so eventually that "pass" was replaced by actual effective code.

What do you want me to do?

  1. leave it as is (default, my choice too).
  2. remove this class?
  3. add code to this class definition?
  4. wait for you to add code to this class definition?
Bug:
Release notes:
introduce autoflake pre-commit hook

autoflake complements flake8 for removing unused imports
because flake8 just reports them and fails the pre-commit

followed this reference to integrate via pre-commit:
PyCQA/autoflake#62
@kubevirt-bot
Copy link

@ibesso-rh: Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@myakove
Copy link
Collaborator

myakove commented Aug 1, 2021

@ibesso-rh if pass is redundant, keep it out
Fix CI errors, please.

@myakove
Copy link
Collaborator

myakove commented Aug 1, 2021

@ibesso-rh Please add None in the Release notes: section.

@ibesso-rh
Copy link
Contributor Author

@ibesso-rh if pass is redundant, keep it out
Fix CI errors, please.

fixed. I ran pre-commit with autoflake included.

@ibesso-rh
Copy link
Contributor Author

@ibesso-rh Please add None in the Release notes: section.

done

@myakove
Copy link
Collaborator

myakove commented Aug 2, 2021

/approve

@kubevirt-bot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: myakove

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@myakove myakove merged commit f306d76 into RedHatQE:master Aug 2, 2021
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.

3 participants