uranusjr commented on code in PR #50641:
URL: https://github.com/apache/airflow/pull/50641#discussion_r2101699362


##########
airflow-core/src/airflow/models/expandinput.py:
##########
@@ -130,11 +133,13 @@ def get_total_map_length(self, run_id: str, *, session: 
Session) -> int:
         return length
 
 
-_EXPAND_INPUT_TYPES = {
+_EXPAND_INPUT_TYPES: dict[str, type[SchedulerExpandInput]] = {
     "dict-of-lists": SchedulerDictOfListsExpandInput,
     "list-of-dicts": SchedulerListOfDictsExpandInput,
 }
 
+SchedulerExpandInput = Union[SchedulerDictOfListsExpandInput, 
SchedulerListOfDictsExpandInput]

Review Comment:
   You can put this inside the TYPE_CHECKING block so it’s easier to read. This 
allows you to use
   
   ```python
   SchedulerExpandInput = SchedulerDictOfListsExpandInput | 
SchedulerListOfDictsExpandInput
   ```
   
   too.



-- 
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]

Reply via email to