Skip to content

Conversation

@ashb
Copy link
Member

@ashb ashb commented Feb 25, 2021

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.

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.

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"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sfc-gh-jpotiuk
Copy link

Silly me :(

@ashb
Copy link
Member Author

ashb commented Feb 25, 2021

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_

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not nice pylint :(

Copy link
Member Author

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.

@sfc-gh-jpotiuk
Copy link

I wish we could finally get rid of the TODOs ..

@ashb ashb merged commit ab72b05 into apache:master Feb 25, 2021
@ashb ashb deleted the precommit-pylint-when-only-todo-files-fix branch February 25, 2021 11:08
potiuk pushed a commit that referenced this pull request Mar 3, 2021
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)
potiuk pushed a commit that referenced this pull request Mar 3, 2021
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)
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