You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/02/25 10:08:19 UTC

[GitHub] [airflow] ashb opened a new pull request #14453: Fix pylint pre-commit checks when only todo files are changed

ashb opened a new pull request #14453:
URL: https://github.com/apache/airflow/pull/14453


   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
   
   <!--
   Thank you for contributing! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of existing issue, reference it using one of the following:
   
   closes: #ISSUE
   related: #ISSUE
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   
   ---
   **^ Add meaningful description above**
   
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
   In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.md).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] sfc-gh-jpotiuk commented on a change in pull request #14453: Fix pylint pre-commit checks when only todo files are changed

Posted by GitBox <gi...@apache.org>.
sfc-gh-jpotiuk commented on a change in pull request #14453:
URL: https://github.com/apache/airflow/pull/14453#discussion_r582730639



##########
File path: scripts/ci/static_checks/pylint.sh
##########
@@ -36,14 +36,21 @@ build_images::prepare_ci_build
 
 build_images::rebuild_ci_image_if_needed
 
+# Bug: Pylint only looks at PYLINTRC if it can't find a file in the _default_

Review comment:
       Not nice pylint :(




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] sfc-gh-jpotiuk commented on pull request #14453: Fix pylint pre-commit checks when only todo files are changed

Posted by GitBox <gi...@apache.org>.
sfc-gh-jpotiuk commented on pull request #14453:
URL: https://github.com/apache/airflow/pull/14453#issuecomment-785800383


   Silly me :(


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] sfc-gh-jpotiuk commented on pull request #14453: Fix pylint pre-commit checks when only todo files are changed

Posted by GitBox <gi...@apache.org>.
sfc-gh-jpotiuk commented on pull request #14453:
URL: https://github.com/apache/airflow/pull/14453#issuecomment-785801688


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


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ashb commented on a change in pull request #14453: Fix pylint pre-commit checks when only todo files are changed

Posted by GitBox <gi...@apache.org>.
ashb commented on a change in pull request #14453:
URL: https://github.com/apache/airflow/pull/14453#discussion_r582705187



##########
File path: .pre-commit-config.yaml
##########
@@ -585,22 +585,22 @@ repos:
       - id: pylint
         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"

Review comment:
       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




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ashb commented on pull request #14453: Fix pylint pre-commit checks when only todo files are changed

Posted by GitBox <gi...@apache.org>.
ashb commented on pull request #14453:
URL: https://github.com/apache/airflow/pull/14453#issuecomment-785801309


   Easy mistake to make


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ashb merged pull request #14453: Fix pylint pre-commit checks when only todo files are changed

Posted by GitBox <gi...@apache.org>.
ashb merged pull request #14453:
URL: https://github.com/apache/airflow/pull/14453


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ashb commented on a change in pull request #14453: Fix pylint pre-commit checks when only todo files are changed

Posted by GitBox <gi...@apache.org>.
ashb commented on a change in pull request #14453:
URL: https://github.com/apache/airflow/pull/14453#discussion_r582731061



##########
File path: scripts/ci/static_checks/pylint.sh
##########
@@ -36,14 +36,21 @@ build_images::prepare_ci_build
 
 build_images::rebuild_ci_image_if_needed
 
+# Bug: Pylint only looks at PYLINTRC if it can't find a file in the _default_

Review comment:
       Turns out it's even more annoying that that. PYLINTRC is an _additional_ pylint file.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org