NithinU2802 opened a new issue, #53717: URL: https://github.com/apache/airflow/issues/53717
### Apache Airflow version main (development) ### If "Other Airflow 2 version" selected, which one? _No response_ ### What happened? In [line-66](https://github.com/apache/airflow/blob/main/airflow-core/src/airflow/api_fastapi/common/exceptions.py) annotation for self.dialect in the _UniqueConstraintErrorHandler class was previously set to _DatabaseDialect.value | None, which is not valid Python typing. Because .value refers to the underlying string, not the Enum member itself. Using the wrong type causes type checker errors. ### What you think should happen instead? _No response_ ### How to reproduce The correct annotation should be _DatabaseDialect | None instead of using _DatabaseDialect.value | None as well. ### Operating System Microsoft Windows 11 ### Versions of Apache Airflow Providers _No response_ ### Deployment Other ### Deployment details _No response_ ### Anything else? Please check and let me know if it’s okay to proceed with the changes. I understand that we can access the enum value using _DatabaseDialect.SQLITE.value. However, using .value in a type hint (like _DatabaseDialect.value) is not valid syntax. Please feel free to correct me or share your thoughts if I’ve misunderstood anything. ### Are you willing to submit PR? - [x] Yes I am willing to submit a PR! ### Code of Conduct - [x] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md) -- 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]
