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

Avoid if-else simplification for TYPE_CHECKING blocks #8072

Merged
merged 1 commit into from
Oct 19, 2023

Conversation

charliermarsh
Copy link
Member

Closes #8071.

@charliermarsh charliermarsh added the bug Something isn't working label Oct 19, 2023
@charliermarsh charliermarsh requested a review from zanieb October 19, 2023 18:53
@charliermarsh
Copy link
Member Author

We can merge this, but I should audit the other if rules.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 19, 2023

PR Check Results

Ecosystem

ℹ️ ecosystem check detected changes. (+0, -1, 0 error(s))

airflow (+0, -1)

- airflow/models/xcom.py:875:1: SIM108 Use ternary operator `XCom = BaseXCom if TYPE_CHECKING else resolve_xcom_backend()` instead of `if`-`else`-block

Rules changed: 1
Rule Changes Additions Removals
SIM108 1 0 1

@charliermarsh charliermarsh merged commit 256b98a into main Oct 19, 2023
16 checks passed
@charliermarsh charliermarsh deleted the charlie/SIM108 branch October 19, 2023 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SIM108 suggests to convert TYPE_CHECKING block
1 participant