Skip to content

Conversation

@cclauss
Copy link

@cclauss cclauss commented May 2, 2018

Declare as global virtualenv_string_args defined elsewhere

Without this change flake8 will complain of undefined name virtualenv_string_args which is discussed at:

flake8 testing of https://github.com/apache/incubator-airflow on Python 3.6.3

$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics

./tests/operators/test_virtualenv_operator.py:166:19: F821 undefined name 'virtualenv_string_args'
            print(virtualenv_string_args)
                  ^
./tests/operators/test_virtualenv_operator.py:167:16: F821 undefined name 'virtualenv_string_args'
            if virtualenv_string_args[0] != virtualenv_string_args[2]:
               ^
./tests/operators/test_virtualenv_operator.py:167:45: F821 undefined name 'virtualenv_string_args'
            if virtualenv_string_args[0] != virtualenv_string_args[2]:
                                            ^

Make sure you have checked all steps below.

JIRA

  • My PR addresses the following Airflow JIRA issues and references them in the PR title. For example, "[AIRFLOW-XXX] My Airflow PR"

Description

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

Tests

  • My PR adds the following unit tests OR does not need testing for this extremely good reason:
    It fixes tests flake8 that currently fail.

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
    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.
    • When adding new operators/hooks/sensors, the autoclass documentation generation needs to be added.

Code Quality

  • Passes git diff upstream/master -u -- "*.py" | __python3 -m__ flake8 --diff

…here

Without this change __flake8__ will complain of undefined name __virtualenv_string_args__ which is discussed at:
* https://github.com/apache/incubator-airflow/blob/master/airflow/operators/python_operator.py#L167

flake8 testing of https://github.com/apache/incubator-airflow on Python 3.6.3

$ __flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics__
```
./tests/operators/test_virtualenv_operator.py:166:19: F821 undefined name 'virtualenv_string_args'
            print(virtualenv_string_args)
                  ^
./tests/operators/test_virtualenv_operator.py:167:16: F821 undefined name 'virtualenv_string_args'
            if virtualenv_string_args[0] != virtualenv_string_args[2]:
               ^
./tests/operators/test_virtualenv_operator.py:167:45: F821 undefined name 'virtualenv_string_args'
            if virtualenv_string_args[0] != virtualenv_string_args[2]:
                                            ^
```
@codecov-io
Copy link

Codecov Report

Merging #3293 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3293      +/-   ##
==========================================
- Coverage   75.89%   75.88%   -0.01%     
==========================================
  Files         197      197              
  Lines       14706    14706              
==========================================
- Hits        11161    11160       -1     
- Misses       3545     3546       +1
Impacted Files Coverage Δ
airflow/models.py 86.64% <0%> (-0.05%) ⬇️

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 96d00da...ec07e0c. Read the comment docs.

@cclauss cclauss changed the title [AIRFLOW-2407] Declare as global virtualenv_string_args defined elsew… [AIRFLOW-2407] Declare as global virtualenv_string_args May 2, 2018
@cclauss
Copy link
Author

cclauss commented May 3, 2018

Closed in favor of #3307

@cclauss cclauss closed this May 3, 2018
@cclauss cclauss deleted the patch-1 branch May 3, 2018 10:28
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.

2 participants