Skip to content

Conversation

@josh-fell
Copy link
Contributor

@josh-fell josh-fell commented Dec 4, 2021

Related: #19891


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.

@josh-fell josh-fell mentioned this pull request Dec 4, 2021
10 tasks
@github-actions github-actions bot added the full tests needed We need to run full set of tests for this PR to merge label Dec 4, 2021
@github-actions
Copy link

github-actions bot commented Dec 4, 2021

The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease.

@potiuk potiuk added the mypy Fixing MyPy problems after bumpin MyPy to 0.990 label Dec 13, 2021
@josh-fell josh-fell force-pushed the fix-mypy-errors-airflow-decorators branch from a66065a to 896c43d Compare December 16, 2021 20:05
@josh-fell
Copy link
Contributor Author

@uranusjr @potiuk I pushed some other changes here to fix decorators more generally. I'm still not quite sure how to resolve this error though:

airflow/decorators/__init__.py:45: error: Cannot assign to a type
            _TaskDecorator = _DockerTask

A cast() resolves the issue but I'm not sure if this is the proper fix given the code context.

@josh-fell josh-fell changed the title Fix most mypy errors in airflow/decorators Fix most MyPy errors for Airflow decorators Dec 16, 2021
@josh-fell josh-fell marked this pull request as ready for review December 16, 2021 20:07
@ashb
Copy link
Member

ashb commented Dec 16, 2021

@uranusjr @potiuk I pushed some other changes here to fix decorators more generally. I'm still not quite sure how to resolve this error though:

airflow/decorators/__init__.py:45: error: Cannot assign to a type
            _TaskDecorator = _DockerTask

A cast() resolves the issue but I'm not sure if this is the proper fix given the code context.

This is us playing tricks for IDE support. A # type: ignore or a cast() is perfectly valid solution to that.

@josh-fell josh-fell changed the title Fix most MyPy errors for Airflow decorators Fix MyPy errors for Airflow decorators Dec 17, 2021
@josh-fell josh-fell force-pushed the fix-mypy-errors-airflow-decorators branch from dc74b84 to d699a4f Compare December 22, 2021 03:08
@potiuk potiuk merged commit 59e4b78 into apache:main Dec 29, 2021
@josh-fell josh-fell deleted the fix-mypy-errors-airflow-decorators branch December 30, 2021 16:21
@kaxil kaxil added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Jan 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) full tests needed We need to run full set of tests for this PR to merge mypy Fixing MyPy problems after bumpin MyPy to 0.990

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants