ecodina commented on PR #59411: URL: https://github.com/apache/airflow/pull/59411#issuecomment-3679099839
Thanks for pointing that out, @dabla! It indeed makes the code even cleaner. I had a ValueError there just for mypy. Pydantic already checks that the `grant_type` is of the correct type. I've added the `create_token` to the `Token**Body` methods, not to the `TokenBody` since it is a RootModel and not a base class. Moreover, if `grant_type` were compulsory, `TokenBody` would not be needed (only `TokenUnion`). -- 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]
