rohitdhiman1 opened a new pull request, #64606: URL: https://github.com/apache/airflow/pull/64606
Add full type hints for all dict-typed `AirflowPlugin` attributes so plugin authors get IDE autocompletion and type-checker support. Many `AirflowPlugin` attributes (`fastapi_apps`, `external_views`, `react_apps`, etc.) are typed as `list[Any]`, giving plugin developers no IDE guidance on required keys or their types. A typo in a key name is only caught at runtime. Six `TypedDict` classes are introduced using the required/optional two-class split pattern so optional keys are accurately modelled: | TypedDict | Attribute | |---|---| | `FastAPIAppDict` | `fastapi_apps` | | `FastAPIRootMiddlewareDict` | `fastapi_root_middlewares` | | `ExternalViewDict` | `external_views` | | `ReactAppDict` | `react_apps` | | `AppBuilderViewDict` | `appbuilder_views` | | `AppBuilderMenuItemDict` | `appbuilder_menu_items` | All six are defined in the shared `plugins_manager` library and re-exported from `airflow.plugins_manager` for easy import by plugin authors. No new dependencies. Fully backward compatible — existing plugins using plain dicts continue to work unchanged. closes: #62222 --- ##### Was generative AI tooling used to co-author this PR? - [] -- 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]
