pierrejeambrun commented on code in PR #42320: URL: https://github.com/apache/airflow/pull/42320#discussion_r1771066684
########## airflow/api_fastapi/db.py: ########## @@ -19,6 +19,9 @@ from typing import TYPE_CHECKING +from sqlalchemy.sql import Select + +from airflow.api_fastapi.parameters import BaseParam Review Comment: "TCH001" and "TCH002" are disabled on `api_fastapi` folder. Same reason as for `serialization/pydantic/` pydantic manipulates annotations at runtime and this things will fail. Also fails to detect `Annotated[type, ...]` depends as required at runtime. Moving things to such codeblock will fail. I don't think theres really a better workaround considering our constraints: - We need `from future import __annotation__` in the file - We want to support python 3.8 and 3.9 I moved to type checking block those that are not throwing errors. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
