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

[misc] Replace XOR ^ conditions by exactly_one helper in providers #27858

Merged
merged 1 commit into from
Dec 3, 2022

Conversation

Taragolis
Copy link
Contributor

Follow-up: #27775 (comment)

This PR potentially add more code readability. exactly_one helper exists in Airflow 2.3 so it should be safe to use it in providers packages.

I also added additional tests fro conditions which not tested before

@boring-cyborg boring-cyborg bot added area:providers provider:amazon-aws AWS/Amazon - related issues provider:google Google (including GCP) related issues labels Nov 23, 2022
@vincbeck
Copy link
Contributor

I dont have strong opinion on that topic (whether we should use ^ or exactly_one) but I tend to prefer using native operators/functions when it is possible than custom ones. Although I agree, in some cases it is more readable with exactly_one. Again, I am totally fine with these changes, I just wanted to bring it up :)

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.

Nice. This is precisely one of those small improvements we can do now with min-version bump :)

@potiuk potiuk merged commit 527b948 into apache:main Dec 3, 2022
@Taragolis Taragolis deleted the replace-xor-by-exactly-one branch December 3, 2022 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:providers provider:amazon-aws AWS/Amazon - related issues provider:google Google (including GCP) related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants