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/06/27 18:24:33 UTC

[GitHub] [airflow] potiuk opened a new pull request #16682: Remove pylint

potiuk opened a new pull request #16682:
URL: https://github.com/apache/airflow/pull/16682


   We've agreed during the voting process that Pylint support
   should be disabled: https://lists.apache.org/thread.html/r9e2cc385db8737ec0874ad09872081bd083593ee29e8303e58d21efb%40%3Cdev.airflow.apache.org%3E
   
   This PR:
   
   * removes all # pylint comments
   * removes pylint pre-commits and related scripts/files
   * removes CI jobs running pylint checks
   * removes documentation about pylint
   
   <!--
   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/main/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/main/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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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



[GitHub] [airflow] potiuk merged pull request #16682: Remove pylint

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


   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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



[GitHub] [airflow] ashb commented on a change in pull request #16682: Remove pylint

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



##########
File path: .pre-commit-config.yaml
##########
@@ -644,12 +642,6 @@ repos:
         files: ^airflow/www/static/js/
         entry: scripts/ci/static_checks/www_lint.sh
         pass_filenames: false
-      - id: bats-in-container-tests
-        name: Run in container bats tests
-        language: system
-        entry: ./scripts/ci/pre_commit/pre_commit_in_container_bats_test.sh
-        files: ^tests/bats/in_container/.*\.bats$|^scripts/in_container/.*sh
-        pass_filenames: false

Review comment:
       Seems unrelated to 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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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



[GitHub] [airflow] mik-laj commented on a change in pull request #16682: Remove pylint

Posted by GitBox <gi...@apache.org>.
mik-laj commented on a change in pull request #16682:
URL: https://github.com/apache/airflow/pull/16682#discussion_r659568440



##########
File path: airflow/api/client/json_client.py
##########
@@ -31,12 +31,12 @@ def _request(self, url, method='GET', json=None):
         }
         if json is not None:
             params['json'] = json
-        resp = getattr(self._session, method.lower())(**params)  # pylint: disable=not-callable
+        resp = getattr(self._session, method.lower())(**params)
         if not resp.ok:
             # It is justified here because there might be many resp types.
             try:
                 data = resp.json()
-            except Exception:  # noqa pylint: disable=broad-except
+            except Exception:  # noqa

Review comment:
       Flake dont support this case. In other place, we have broad exception without `noqa` tag. 




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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



[GitHub] [airflow] potiuk commented on pull request #16682: Remove pylint

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


   Booom


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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



[GitHub] [airflow] potiuk commented on a change in pull request #16682: Remove pylint

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



##########
File path: airflow/api/client/json_client.py
##########
@@ -31,12 +31,12 @@ def _request(self, url, method='GET', json=None):
         }
         if json is not None:
             params['json'] = json
-        resp = getattr(self._session, method.lower())(**params)  # pylint: disable=not-callable
+        resp = getattr(self._session, method.lower())(**params)
         if not resp.ok:
             # It is justified here because there might be many resp types.
             try:
                 data = resp.json()
-            except Exception:  # noqa pylint: disable=broad-except
+            except Exception:  # noqa

Review comment:
       I think flake also complains about this case. But yeah. yesqa is a good idea. I will run it now no problem.




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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



[GitHub] [airflow] potiuk commented on pull request #16682: Remove pylint

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


   I deed. Might be a good point also for few other changes like that. But this has to be a separate PR after we know the  commit hash :) 


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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



[GitHub] [airflow] potiuk commented on pull request #16682: Remove pylint

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


   Anticipating the result of voting - I prepared this PR that removes 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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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



[GitHub] [airflow] uranusjr commented on pull request #16682: Remove pylint

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


   (The changeset is so big GitHub is having trouble rendering, so I’m going to assume this is correct…)


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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



[GitHub] [airflow] github-actions[bot] commented on pull request #16682: Remove pylint

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #16682:
URL: https://github.com/apache/airflow/pull/16682#issuecomment-869249338


   The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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



[GitHub] [airflow] potiuk commented on a change in pull request #16682: Remove pylint

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



##########
File path: airflow/_vendor/connexion/decorators/parameter.py
##########
@@ -6,7 +6,7 @@
 import inflection
 
 from ..http_facts import FORM_CONTENT_TYPES
-from ..lifecycle import ConnexionRequest  # NOQA
+from ..lifecycle import ConnexionRequest

Review comment:
       Good point. fixing it 




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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



[GitHub] [airflow] ashb commented on a change in pull request #16682: Remove pylint

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



##########
File path: .pre-commit-config.yaml
##########
@@ -644,12 +642,6 @@ repos:
         files: ^airflow/www/static/js/
         entry: scripts/ci/static_checks/www_lint.sh
         pass_filenames: false
-      - id: bats-in-container-tests
-        name: Run in container bats tests
-        language: system
-        entry: ./scripts/ci/pre_commit/pre_commit_in_container_bats_test.sh
-        files: ^tests/bats/in_container/.*\.bats$|^scripts/in_container/.*sh
-        pass_filenames: false

Review comment:
       Nah, it's good.




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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



[GitHub] [airflow] uranusjr commented on pull request #16682: Remove pylint

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


   We should add a `.git-blame-ignore-revs` file for this commit.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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



[GitHub] [airflow] potiuk merged pull request #16682: Remove pylint

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


   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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



[GitHub] [airflow] ashb commented on a change in pull request #16682: Remove pylint

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



##########
File path: .pre-commit-config.yaml
##########
@@ -644,12 +642,6 @@ repos:
         files: ^airflow/www/static/js/
         entry: scripts/ci/static_checks/www_lint.sh
         pass_filenames: false
-      - id: bats-in-container-tests
-        name: Run in container bats tests
-        language: system
-        entry: ./scripts/ci/pre_commit/pre_commit_in_container_bats_test.sh
-        files: ^tests/bats/in_container/.*\.bats$|^scripts/in_container/.*sh
-        pass_filenames: false

Review comment:
       Oh it moved.




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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



[GitHub] [airflow] mik-laj commented on a change in pull request #16682: Remove pylint

Posted by GitBox <gi...@apache.org>.
mik-laj commented on a change in pull request #16682:
URL: https://github.com/apache/airflow/pull/16682#discussion_r659399237



##########
File path: airflow/api/client/json_client.py
##########
@@ -31,12 +31,12 @@ def _request(self, url, method='GET', json=None):
         }
         if json is not None:
             params['json'] = json
-        resp = getattr(self._session, method.lower())(**params)  # pylint: disable=not-callable
+        resp = getattr(self._session, method.lower())(**params)
         if not resp.ok:
             # It is justified here because there might be many resp types.
             try:
                 data = resp.json()
-            except Exception:  # noqa pylint: disable=broad-except
+            except Exception:  # noqa

Review comment:
       I suspect that this `noqa` tag has no effect on any tool now.  We should use [`yesqa`](https://github.com/asottile/yesqa) to delete the unused tag, but we can do it as a separate PR. 




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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



[GitHub] [airflow] ashb commented on a change in pull request #16682: Remove pylint

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



##########
File path: airflow/_vendor/connexion/decorators/parameter.py
##########
@@ -6,7 +6,7 @@
 import inflection
 
 from ..http_facts import FORM_CONTENT_TYPES
-from ..lifecycle import ConnexionRequest  # NOQA
+from ..lifecycle import ConnexionRequest

Review comment:
       Generally I'd say we shouldn't check/change code under `airflow/_vendor/` -- so we should exclude this from the Yesqa check if it's complaining and not otherwise touch these files




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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



[GitHub] [airflow] potiuk edited a comment on pull request #16682: Remove pylint

Posted by GitBox <gi...@apache.org>.
potiuk edited a comment on pull request #16682:
URL: https://github.com/apache/airflow/pull/16682#issuecomment-869472669


   Indeed. Might be a good point also for few other changes like that. But this has to be a separate PR after we know the  commit hash :) 


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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



[GitHub] [airflow] potiuk commented on pull request #16682: Remove pylint

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


   Booom


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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



[GitHub] [airflow] potiuk commented on a change in pull request #16682: Remove pylint

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



##########
File path: .pre-commit-config.yaml
##########
@@ -644,12 +642,6 @@ repos:
         files: ^airflow/www/static/js/
         entry: scripts/ci/static_checks/www_lint.sh
         pass_filenames: false
-      - id: bats-in-container-tests
-        name: Run in container bats tests
-        language: system
-        entry: ./scripts/ci/pre_commit/pre_commit_in_container_bats_test.sh
-        files: ^tests/bats/in_container/.*\.bats$|^scripts/in_container/.*sh
-        pass_filenames: false

Review comment:
       It's moved to after the `build` step - the check failed if the build has not been run before (discovered it while testing this change). I can separate it out, but since we are changing the pre-commit anyway quite heavily, fixing it in the "big" pylint cleanup PR might be a good idea.




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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



[GitHub] [airflow] potiuk commented on pull request #16682: Remove pylint

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


   I've added `yesqa` to pre-commits and removed all the unnecessary #noqa's. It removed a bit too many of those initially. It does not understand some pydocstyle problems but I figured it will be easier to remove a "public method no doc" error `D103 | Missing docstring in public function`  (which I think is far too much to expect) and fixed remaining small docstyle errors which were earlier ignored by #noqa. 


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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