kik-kik commented on a change in pull request #6459: [AIRFLOW-5243] Make 
airflow/configuration pylint compatible
URL: https://github.com/apache/airflow/pull/6459#discussion_r342199592
 
 

 ##########
 File path: airflow/configuration.py
 ##########
 @@ -369,59 +381,86 @@ def as_dict(
             command to run (False)
         :type include_cmds: bool
         """
-        cfg = {}
+        config = {}
         configs = [
             ('default', self.airflow_defaults),
             ('airflow.cfg', self),
         ]
 
         for (source_name, config) in configs:
             for section in config.sections():
-                sect = cfg.setdefault(section, OrderedDict())
-                for (k, val) in config.items(section=section, raw=raw):
-                    if display_source:
-                        val = (val, source_name)
-                    sect[k] = val
+                self._set_config_section(config, display_source, raw, section, 
source_name)
 
 Review comment:
   Was trying to reduce the depth (pylint error) by extracting the logic into 
separate functions

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


With regards,
Apache Git Services

Reply via email to