mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-28 10:50:26 +00:00
<!-- Thank you for contributing to Ruff! To help us out with reviewing, please consider the following: - Does this pull request include a summary of the change? (See below.) - Does this pull request include a descriptive title? - Does this pull request include references to any relevant issues? --> ## Summary <!-- What's the purpose of the change? What does it do, and why? --> If a try-catch block guards the names, we don't raise warnings. During this change, I discovered that some of the replacement types were missed. Thus, I extend the fix to types other than AutoImport as well ## Test Plan <!-- How was it tested? --> Test fixtures are added and updated.
8 lines
235 B
Python
8 lines
235 B
Python
from __future__ import annotations
|
|
|
|
try:
|
|
from airflow.providers.http.operators.http import HttpOperator
|
|
except ModuleNotFoundError:
|
|
from airflow.operators.http_operator import SimpleHttpOperator as HttpOperator
|
|
|
|
HttpOperator()
|