Skip to content
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

Remove Unnecessary comprehension #12221

Merged
merged 2 commits into from
Nov 10, 2020
Merged

Conversation

kaxil
Copy link
Member

@kaxil kaxil commented Nov 10, 2020

The inbuilt functions all() and any() in python support
short-circuiting (evaluation stops as soon as the overall return value
of the function is known), but this behaviour is lost if you use
comprehension. This affects performance.


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

@github-actions
Copy link

The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Backport packages$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*.

@XD-DENG
Copy link
Member

XD-DENG commented Nov 10, 2020

Static check is saying: GOTCHA😉

@potiuk
Copy link
Member

potiuk commented Nov 10, 2020

Static check is saying: GOTCHA

It caught you red-handed @kaxil :)

The inbuilt functions all() and any() in python also support
short-circuiting (evaluation stops as soon as the overall return value
of the function is known), but this behavior is lost if you use
comprehension. This affects performance.
@kaxil
Copy link
Member Author

kaxil commented Nov 10, 2020

Haha :D fixed it

@github-actions github-actions bot added the full tests needed We need to run full set of tests for this PR to merge label Nov 10, 2020
@github-actions
Copy link

The PR needs to run all tests because it modifies core of Airflow! Please rebase it to latest master or ask committer to re-run it!

@XD-DENG XD-DENG removed the full tests needed We need to run full set of tests for this PR to merge label Nov 10, 2020
@kaxil kaxil merged commit f8ae6e5 into apache:master Nov 10, 2020
@kaxil kaxil deleted the fix-un-comprehension branch November 10, 2020 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants