andrewgodwin opened a new pull request #15285: URL: https://github.com/apache/airflow/pull/15285
For unfortunate reasons, we can't use Enums (changes the ultimate type of the values from str to EnumValue, so a lot of stuff breaks) and we can't re-use a tuple/iterable of values as a type declaration, so this ends up being the way it has to be done. I'm not super keen on this, but wanted to present it as one of three possible solutions, the others being: * Switching TaskState and DagState to _actually_ be an enum, and have to go rewrite a large chunk of core code and potentially break compatability with many providers since it'll change the values of all the states to be of type `EnumValue`. * Closing issue #9387 as "we're not going to do this now" This PR does the main type addition and a few other type annotations around the codebase; it's not exhaustive, since I'm not yet sure we'll go this route, but if we do like it I'll probably hunt down some more places to annotate before finally merging. closes: #9387 -- 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. For queries about this service, please contact Infrastructure at: [email protected]
