You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2019/01/19 11:33:01 UTC
[jira] [Commented] (AIRFLOW-2407) Undefined names in Python code
[ https://issues.apache.org/jira/browse/AIRFLOW-2407?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16747040#comment-16747040 ]
ASF subversion and git services commented on AIRFLOW-2407:
----------------------------------------------------------
Commit 5e3825d811d6b78fc6f4fe81f424c57552f38f48 in airflow's branch refs/heads/v1-10-test from cclauss
[ https://gitbox.apache.org/repos/asf?p=airflow.git;h=5e3825d ]
[AIRFLOW-2407] Use feature detection for reload() (#3298)
* [AIRFLOW-2407] Use feature detection for reload()
[Use feature detection instead of version detection](https://docs.python.org/3/howto/pyporting.html#use-feature-detection-instead-of-version-detection) is a Python porting best practice that avoids a flake8 undefined name error...
flake8 testing of https://github.com/apache/incubator-airflow on Python 3.6.3
> Undefined names in Python code
> ------------------------------
>
> Key: AIRFLOW-2407
> URL: https://issues.apache.org/jira/browse/AIRFLOW-2407
> Project: Apache Airflow
> Issue Type: Bug
> Reporter: cclauss
> Priority: Minor
> Fix For: 2.0.0
>
> Original Estimate: 336h
> Remaining Estimate: 336h
>
> 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*
> {noformat}
> ./airflow/contrib/auth/backends/kerberos_auth.py:67:13: F821 undefined name 'logging'
> logging.error('Password validation for principal %s failed %s', user_principal, e)
> ^
> ./airflow/contrib/hooks/aws_hook.py:75:13: F821 undefined name 'logging'
> logging.warning("Option Error in parsing s3 config file")
> ^
> ./airflow/contrib/operators/datastore_export_operator.py:105:19: F821 undefined name 'AirflowException'
> raise AirflowException('Operation failed: result={}'.format(result))
> ^
> ./airflow/contrib/operators/datastore_import_operator.py:94:19: F821 undefined name 'AirflowException'
> raise AirflowException('Operation failed: result={}'.format(result))
> ^
> ./airflow/contrib/sensors/qubole_sensor.py:62:9: F821 undefined name 'this'
> this.log.info('Poking: %s', self.data)
> ^
> ./airflow/contrib/sensors/qubole_sensor.py:68:13: F821 undefined name 'logging'
> logging.exception(e)
> ^
> ./airflow/contrib/sensors/qubole_sensor.py:71:9: F821 undefined name 'this'
> this.log.info('Status of this Poke: %s', status)
> ^
> ./airflow/www/app.py:148:17: F821 undefined name 'reload'
> reload(e)
> ^
> ./tests/operators/hive_operator.py:178:27: F821 undefined name 'cursor_mock'
> __enter__=cursor_mock,
> ^
> ./tests/operators/hive_operator.py:184:27: F821 undefined name 'get_conn_mock'
> __enter__=get_conn_mock,
> ^
> ./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]:
> ^
> 13 F821 undefined name 'logging'
> 13
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)