File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -78,12 +78,19 @@ def toml_config():
7878 @staticmethod
7979 def file_config ():
8080 '''Return any file configuration discovered'''
81- config = configparser .ConfigParser ()
81+ config = configparser .RawConfigParser ()
8282 for path in (os .getenv ('RADONCFG' , None ), 'radon.cfg' ):
8383 if path is not None and os .path .exists (path ):
8484 config .read_file (open (path ))
8585 config .read_dict (FileConfig .toml_config ())
8686 config .read (['setup.cfg' , os .path .expanduser ('~/.radon.cfg' )])
87+
88+ if config .has_section (CONFIG_SECTION_NAME ):
89+ section = dict (config .items (CONFIG_SECTION_NAME ))
90+ interpolated_config = configparser .ConfigParser ()
91+ interpolated_config [CONFIG_SECTION_NAME ] = section
92+ config = interpolated_config
93+
8794 return config
8895
8996
You can’t perform that action at this time.
0 commit comments