jason810496 commented on code in PR #64209:
URL: https://github.com/apache/airflow/pull/64209#discussion_r3000390347


##########
shared/configuration/src/airflow_shared/configuration/parser.py:
##########
@@ -327,7 +390,7 @@ def _get_option_from_provider_metadata_config_fallbacks(
     ) -> str | ValueNotFound:
         """Get config option from provider metadata fallback defaults."""
         value = 
self.get_from_provider_metadata_config_fallback_defaults(section, key, **kwargs)
-        if value is not None:
+        if value is not VALUE_NOT_FOUND_SENTINEL:
             return value
         return VALUE_NOT_FOUND_SENTINEL

Review Comment:
   The `VALUE_NOT_FOUND_SENTINEL` here is more accurate than existing `None` if 
I understand correct.
   The whole method looks like the following now:
   ```python
   def _get_option_from_provider_metadata_config_fallbacks(
           self,
           deprecated_key: str | None,
           deprecated_section: str | None,
           key: str,
           section: str,
           issue_warning: bool = True,
           extra_stacklevel: int = 0,
           **kwargs,
       ) -> str | ValueNotFound:
           """Get config option from provider metadata fallback defaults."""
           value = 
self.get_from_provider_metadata_config_fallback_defaults(section, key, **kwargs)
           if value is not VALUE_NOT_FOUND_SENTINEL:
               return value
           return VALUE_NOT_FOUND_SENTINEL
   ```



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