-
Notifications
You must be signed in to change notification settings - Fork 14.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix mypy typing for airflow/models and their tests #20272
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few nits and questions
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. |
Few statics to fix too. |
The re-ordering of setting attributes in BaseOperator is because _something_ about that function (throwing the exceptions?) causes mypy to think that BaseOperator objects could be missing those attributes
Yeah, flake8 was having odd problems and not running for me locally last night (wasn't giving any errors, but just saying it failed. I didn't dig in to it closely as it was late) |
Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
For reference this is the flake8 error I get:
|
MyPy now not reporting anything for Fix one break one 😞 |
|
Hey @ashb - the Unfortunately (I raised it to github) if you have expired token, you even can't download public images (!) which you can when you have no GITHUB_TOKEN at all! |
If that's confirmed I might want to add some protection agains that :) |
I have no |
Ah -- but I do have |
No dice.
|
non-verbose and verbose output of running flake8 here @potiuk https://gist.github.com/ashb/791aa5b98d12942fd871fa4291bb6346 |
AaaaaaH I know! Flake checks run in parallell and remove each other generated file ! |
The re-ordering of setting attributes in BaseOperator is because
something about that function (throwing the exceptions?) causes mypy
to think that BaseOperator objects could be missing those attributes
Part of #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.