potiuk commented on a change in pull request #12837:
URL: https://github.com/apache/airflow/pull/12837#discussion_r537086248



##########
File path: airflow/providers_manager.py
##########
@@ -289,6 +307,28 @@ def _add_widgets(self, package_name: str, hook_class: 
type, widgets: Dict[str, F
                 hook_class.__name__, package_name, field
             )
 
+    def _add_customized_fields(self, package_name: str, hook_class: type, 
customized_fields: Dict):
+        try:
+            connection_type = getattr(hook_class, "conn_type")
+            
self._customized_form_fields_schema_validator.validate(customized_fields)
+            if connection_type in self._field_customizations:
+                log.warning(
+                    "The connection_type %s from package %s and class %s has 
already been added "
+                    "by another provider. Ignoring it.",
+                    connection_type,
+                    package_name,
+                    hook_class.__name__,
+                )
+                return
+            self._field_customizations[connection_type] = customized_fields
+        except Exception as e:  # noqa pylint: disable=broad-except
+            log.warning(
+                "Error when loading customized fields from package '%s' " 
"hook class '%s': %s",

Review comment:
       ah black joined it




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


Reply via email to