Skip to content

[AIRFLOW-4688]: Fix Pylint checks on modules under scripts folder#7850

Merged
potiuk merged 9 commits intoapache:masterfrom
gdevanla:master
Mar 30, 2020
Merged

[AIRFLOW-4688]: Fix Pylint checks on modules under scripts folder#7850
potiuk merged 9 commits intoapache:masterfrom
gdevanla:master

Conversation

@gdevanla
Copy link
Contributor

@gdevanla gdevanla commented Mar 24, 2020

Fix Pylint checks. To achieve this, perform minor re-arrangement of code snippets to allow for cleaner code. All checks under scripts folder has been addressed in this change.


Issue link: AIRFLOW-4688

Make sure to mark the boxes below before creating PR: [x]


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.
Read the Pull Request Guidelines for more information.

@boring-cyborg
Copy link

boring-cyborg bot commented Mar 24, 2020

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst)
Here are some useful points:

  • Pay attention to the quality of your code (flake8, pylint and type annotations). Our pre-commits will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment for testing locally, it’s a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Be sure to read the Airflow Coding style.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://apache-airflow-slack.herokuapp.com/

@gdevanla gdevanla changed the title [AIRFLOW-4688]: Fix Pylint checkes for modules under scripts [AIRFLOW-4688]: Fix Pylint checks on modules under scripts folder Mar 24, 2020
@potiuk
Copy link
Member

potiuk commented Mar 24, 2020

I think there are two more files failing static checks. Can you please fix them @gdevanla ?

@gdevanla gdevanla force-pushed the master branch 5 times, most recently from 57cb734 to 77a611c Compare March 28, 2020 15:24
@gdevanla
Copy link
Contributor Author

I observe locally the isort is using the global settings files during pre-commit run.

Shouldn't airflow have its own project specific isort.cfg?

Copy link
Member

@potiuk potiuk left a comment

Choose a reason for hiding this comment

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

Thanks @gdevanla gdevanla. That's nice contribution - just one comment - to change all the pylint rules to use names.

Answering your question about isort - yep. Feel free to make a separate PR with isort.cfg !

Copy link
Member

Choose a reason for hiding this comment

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

It's better to use names of the checks. This way it's cleared what it is about.

Copy link
Member

Choose a reason for hiding this comment

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

Same here and other places

@potiuk
Copy link
Member

potiuk commented Mar 28, 2020

And please rebase to latest master. It contains fix for the failing build.

@gdevanla
Copy link
Contributor Author

Thanks for the suggestion on isort. I will take a look at it when I get a chance. Do I need to submit an corresponding ticket on JIRA for that?

@codecov-io
Copy link

codecov-io commented Mar 29, 2020

Codecov Report

Merging #7850 into master will decrease coverage by 0.26%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7850      +/-   ##
==========================================
- Coverage   87.16%   86.90%   -0.27%     
==========================================
  Files         931      931              
  Lines       45173    45173              
==========================================
- Hits        39375    39256     -119     
- Misses       5798     5917     +119     
Impacted Files Coverage Δ
airflow/kubernetes/volume_mount.py 44.44% <0.00%> (-55.56%) ⬇️
airflow/kubernetes/volume.py 52.94% <0.00%> (-47.06%) ⬇️
airflow/kubernetes/pod_launcher.py 47.18% <0.00%> (-45.08%) ⬇️
...viders/cncf/kubernetes/operators/kubernetes_pod.py 69.69% <0.00%> (-25.26%) ⬇️
airflow/kubernetes/refresh_config.py 50.98% <0.00%> (-23.53%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update daad60b...1902c25. Read the comment docs.

@potiuk potiuk merged commit d7583a5 into apache:master Mar 30, 2020
@boring-cyborg
Copy link

boring-cyborg bot commented Mar 30, 2020

Awesome work, congrats on your first merged pull request!

@potiuk
Copy link
Member

potiuk commented Mar 30, 2020

Thanks @gdevanla

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

Comments