Skip to content

Conversation

@TobKed
Copy link
Contributor

@TobKed TobKed commented Sep 18, 2019

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"
    • https://issues.apache.org/jira/browse/AIRFLOW-5514
    • In case you are fixing a typo in the documentation you can prepend your commit with [AIRFLOW-XXX], code changes always need a Jira issue.
    • In case you are proposing a fundamental code change, you need to create an Airflow Improvement Proposal (AIP).
    • In case you are adding a dependency, check if the license complies with the ASF 3rd Party License Policy.

Description

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

Tests

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

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

@TobKed TobKed changed the title [AIRFLOW-XXX] No implicit optional flag for mypy [AIRFLOW-5514] No implicit optional flag for mypy Sep 18, 2019
@TobKed
Copy link
Contributor Author

TobKed commented Sep 18, 2019

PEP-484 says:

A past version of this PEP allowed type checkers to assume an optional type when the default value is None.
...
This is no longer the recommended behavior. Type checkers should move towards requiring the optional type to be made explicit.

Other references:
https://github.com/python/peps/pull/689/files
#5965 (comment)

@TobKed
Copy link
Contributor Author

TobKed commented Sep 18, 2019

cc @mik-laj @potiuk @kaxil

@TobKed TobKed force-pushed the type-annotations-no-implicit-optional branch from 65512fd to 1e5e26b Compare September 18, 2019 10:05
@codecov-io
Copy link

codecov-io commented Sep 18, 2019

Codecov Report

Merging #6141 into master will increase coverage by 0.03%.
The diff coverage is 97.46%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6141      +/-   ##
==========================================
+ Coverage   80.02%   80.05%   +0.03%     
==========================================
  Files         607      607              
  Lines       35032    35036       +4     
==========================================
+ Hits        28034    28049      +15     
+ Misses       6998     6987      -11
Impacted Files Coverage Δ
airflow/operators/bigquery_to_mysql.py 74% <ø> (ø) ⬆️
airflow/api/common/experimental/trigger_dag.py 100% <ø> (ø) ⬆️
airflow/operators/slack_operator.py 100% <ø> (ø) ⬆️
airflow/kubernetes/pod_launcher.py 91.97% <ø> (ø) ⬆️
airflow/operators/hive_stats_operator.py 100% <ø> (ø) ⬆️
airflow/gcp/hooks/automl.py 99.17% <ø> (ø) ⬆️
airflow/gcp/operators/dataproc.py 81.68% <ø> (ø) ⬆️
airflow/gcp/hooks/translate.py 86.66% <ø> (ø) ⬆️
airflow/gcp/hooks/dataproc.py 55.25% <ø> (ø) ⬆️
airflow/operators/python_operator.py 95.75% <ø> (ø) ⬆️
... and 60 more

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 7ad1544...1e5e26b. Read the comment docs.

Copy link
Member

@potiuk potiuk left a comment

Choose a reason for hiding this comment

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

I love it!

@potiuk potiuk merged commit 31f19fb into apache:master Sep 18, 2019
@TobKed TobKed deleted the type-annotations-no-implicit-optional branch September 19, 2019 12:25
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