-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Fix pylint pre-commit checks when only todo files are changed #14453
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
Fix pylint pre-commit checks when only todo files are changed #14453
Conversation
Because we specified `--rcfile` as an argument to the script, the check for "no files" was failing and pylint was being run with no files, resulting in an error.
| name: Run pylint for main code | ||
| language: system | ||
| entry: "./scripts/ci/pre_commit/pre_commit_pylint.sh --rcfile pylintrc" | ||
| entry: "./scripts/ci/pre_commit/pre_commit_pylint.sh" |
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.
We don't need to specify this, pylintrc is one of the defaults places it looks https://github.com/PyCQA/pylint/blame/41d70221cdce96a209a479e349bdb70180bb5e8e/pylint/config/find_default_config_files.py#L27-L63
|
Silly me :( |
|
Easy mistake to make |
|
|
||
| build_images::rebuild_ci_image_if_needed | ||
|
|
||
| # Bug: Pylint only looks at PYLINTRC if it can't find a file in the _default_ |
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.
Not nice pylint :(
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.
Turns out it's even more annoying that that. PYLINTRC is an additional pylint file.
|
I wish we could finally get rid of the TODOs .. |
Because we specified `--rcfile` as an argument to the script, the check for "no files" was failing and pylint was being run with no files, resulting in an error. (cherry picked from commit ab72b05)
Because we specified `--rcfile` as an argument to the script, the check for "no files" was failing and pylint was being run with no files, resulting in an error. (cherry picked from commit ab72b05)
Because we specified
--rcfileas an argument to the script, the checkfor "no files" was failing and pylint was being run with no files,
resulting in an error.
This bug was introduced in #14332
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.