From ec07e0c2618a0753748060a31f1586b3b8a806fa Mon Sep 17 00:00:00 2001 From: cclauss Date: Wed, 2 May 2018 15:20:40 +0200 Subject: [PATCH] [AIRFLOW-2407] Declare as global virtualenv_string_args defined elsewhere 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]: ^ ``` --- tests/operators/test_virtualenv_operator.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/operators/test_virtualenv_operator.py b/tests/operators/test_virtualenv_operator.py index b1d62e3452648..65c6030196318 100644 --- a/tests/operators/test_virtualenv_operator.py +++ b/tests/operators/test_virtualenv_operator.py @@ -163,6 +163,7 @@ def f(a): def test_string_args(self): def f(): + global virtualenv_string_args print(virtualenv_string_args) if virtualenv_string_args[0] != virtualenv_string_args[2]: raise Exception