Skip to content

Comments

[AIRFLOW-4204][WIP] Update super() calls#5042

Closed
milton0825 wants to merge 2 commits intoapache:masterfrom
milton0825:update-super-call
Closed

[AIRFLOW-4204][WIP] Update super() calls#5042
milton0825 wants to merge 2 commits intoapache:masterfrom
milton0825:update-super-call

Conversation

@milton0825
Copy link
Contributor

@milton0825 milton0825 commented Apr 5, 2019

Make sure you have checked all steps below.

Jira

Description

  • Here are some details about my PR, including screenshots of any UI changes:

Replace super(_class, self) by super()

find . -type f -name "*.py" -print0 | xargs -0 sed -i .pyc 's/super(.*, self)/super()/g'

Tests

  • My PR adds the following unit tests OR does not need testing for this extremely good reason:

Not changing any functionality so no test required.

Commits

  • My commits all reference Jira issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":
    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters (not including Jira issue reference)
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not "adding")
    5. Body wraps at 72 characters
    6. Body explains "what" and "why", not "how"

Documentation

  • In case of new functionality, my PR adds documentation that describes how to use it.
    • All the public functions and the classes in the PR contain docstrings that explain what it does
    • If you implement backwards incompatible changes, please leave a note in the Updating.md so we can assign it to a appropriate release

Code Quality

  • Passes flake8

# if this is a valid command key...
if (section, key) in self.as_command_stdout:
if super(AirflowConfigParser, self) \
if super() \
Copy link
Contributor

Choose a reason for hiding this comment

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

This formatting looks a bit odd now, these 2 lines easily fit on a single line. Could you fix these formatting issues?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will start fixing it once #5022 is merged.

@Fokko
Copy link
Contributor

Fokko commented Apr 5, 2019


Collecting flake8
  Using cached https://files.pythonhosted.org/packages/e9/76/b915bd28976068a9843bf836b789794aa4a8eb13338b23581005cd9177c0/flake8-3.7.7-py2.py3-none-any.whl
Collecting mccabe<0.7.0,>=0.6.0 (from flake8)
  Using cached https://files.pythonhosted.org/packages/87/89/479dc97e18549e21354893e4ee4ef36db1d237534982482c3681ee6e7b57/mccabe-0.6.1-py2.py3-none-any.whl
Collecting pyflakes<2.2.0,>=2.1.0 (from flake8)
  Using cached https://files.pythonhosted.org/packages/84/f2/ed0ffb887f8138a8fe5a621b8c0bb9598bfb3989e029f6c6a85ee66628ee/pyflakes-2.1.1-py2.py3-none-any.whl
Collecting pycodestyle<2.6.0,>=2.5.0 (from flake8)
  Using cached https://files.pythonhosted.org/packages/0e/0c/04a353e104d2f324f8ee5f4b32012618c1c86dd79e52a433b64fceed511b/pycodestyle-2.5.0-py2.py3-none-any.whl
Collecting entrypoints<0.4.0,>=0.3.0 (from flake8)
  Using cached https://files.pythonhosted.org/packages/ac/c6/44694103f8c221443ee6b0041f69e2740d89a25641e62fb4f2ee568f2f9c/entrypoints-0.3-py2.py3-none-any.whl
Installing collected packages: mccabe, pyflakes, pycodestyle, entrypoints, flake8
Successfully installed entrypoints-0.3 flake8-3.7.7 mccabe-0.6.1 pycodestyle-2.5.0 pyflakes-2.1.1
43.08s$ flake8
./airflow/www/views.py:2422:17: E131 continuation line unaligned for hanging indent
./airflow/www/views.py:2433:17: E131 continuation line unaligned for hanging indent
./airflow/contrib/sensors/jira_sensor.py:102:48: E127 continuation line over-indented for visual indent
./airflow/contrib/sensors/jira_sensor.py:103:48: E127 continuation line over-indented for visual indent
./airflow/contrib/sensors/jira_sensor.py:104:48: E127 continuation line over-indented for visual indent
./airflow/contrib/operators/slack_webhook_operator.py:70:52: E127 continuation line over-indented for visual indent
./airflow/contrib/operators/slack_webhook_operator.py:71:52: E127 continuation line over-indented for visual indent
./airflow/contrib/operators/sagemaker_transform_operator.py:73:58: E127 continuation line over-indented for visual indent
./airflow/contrib/operators/sagemaker_endpoint_config_operator.py:49:63: E127 continuation line over-indented for visual indent
./airflow/contrib/operators/gcs_acl_operator.py:57:78: E127 continuation line over-indented for visual indent
./airflow/contrib/operators/gcs_acl_operator.py:119:78: E127 continuation line over-indented for visual indent
./airflow/contrib/operators/sagemaker_training_operator.py:67:57: E127 continuation line over-indented for visual indent
./airflow/contrib/operators/sagemaker_model_operator.py:46:54: E127 continuation line over-indented for visual indent
./airflow/contrib/operators/discord_webhook_operator.py:70:54: E127 continuation line over-indented for visual indent
./airflow/contrib/operators/discord_webhook_operator.py:71:54: E127 continuation line over-indented for visual indent
./airflow/contrib/operators/sagemaker_endpoint_operator.py:82:57: E127 continuation line over-indented for visual indent
./airflow/contrib/operators/sagemaker_tuning_operator.py:66:55: E127 continuation line over-indented for visual indent
./airflow/operators/slack_operator.py:129:52: E127 continuation line over-indented for visual indent
./tests/contrib/utils/base_gcp_system_test_case.py:129:52: E127 continuation line over-indented for visual indent
./tests/contrib/utils/base_gcp_system_test_case.py:130:52: E127 continuation line over-indented for visual indent

@Fokko
Copy link
Contributor

Fokko commented Apr 12, 2019

Can you rebase onto master?

@milton0825 milton0825 closed this Apr 21, 2019
@milton0825 milton0825 deleted the update-super-call branch April 21, 2019 05:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants