You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "uranusjr (via GitHub)" <gi...@apache.org> on 2023/08/17 04:50:01 UTC

[GitHub] [airflow] uranusjr commented on a diff in pull request #33452: make `conf.set` case insensitive

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


##########
airflow/configuration.py:
##########
@@ -1307,13 +1307,25 @@ def has_option(self, section: str, option: str) -> bool:
         except (NoOptionError, NoSectionError):
             return False
 
+    def set(self, section: str, option: str, value: str | None = None) -> None:
+        """
+        Set an option to the given value.
+
+        This override just makes sure the section and option are lower case, to match what we do in `get`.
+        """
+        section = str(section).lower()
+        option = str(option).lower()

Review Comment:
   Why do we need to do the additional `str()` casts?



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org