Skip to content

Conversation

@cclauss
Copy link

@cclauss cclauss commented May 2, 2018

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

./airflow/contrib/sensors/qubole_sensor.py:68:13: F821 undefined name 'logging'
            logging.exception(e)
            ^

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:
    This PR fixes flake8 tests that are currently failing.

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

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__
```
./airflow/contrib/sensors/qubole_sensor.py:68:13: F821 undefined name 'logging'
            logging.exception(e)
            ^
```
@Fokko
Copy link
Contributor

Fokko commented May 2, 2018

Please don't import logging, but use this.log.

@cclauss
Copy link
Author

cclauss commented May 2, 2018

LOL... this is an undefined name...

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

./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)
        ^

this also conflicts with the standard library module:
$ python
>>> import this

@codecov-io
Copy link

codecov-io commented May 2, 2018

Codecov Report

Merging #3297 into master will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3297      +/-   ##
==========================================
+ Coverage   75.87%   75.89%   +0.02%     
==========================================
  Files         197      197              
  Lines       14706    14706              
==========================================
+ Hits        11158    11161       +3     
+ Misses       3548     3545       -3
Impacted Files Coverage Δ
airflow/jobs.py 82.83% <0%> (+0.26%) ⬆️

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 12ab796...f30a654. Read the comment docs.

@kaxil
Copy link
Member

kaxil commented May 2, 2018

@cclauss Please can you create a single Pull Request for [AIRFLOW-2407] JIRA instead of separate PR as below:
#3293
#3294
#3296
#3297
#3298
#3299
?

@cclauss
Copy link
Author

cclauss commented May 3, 2018

#3294 (comment)

@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-4 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.

4 participants