fix: Ensuring interpolation is disabled for ConfigParser (#8185)

* fix: Ensuring interpolation is disabled for ConfigParser

This PR disables interpolation of ConfigParser and adds test coverage for that.

* Adding changelog fragment

* Fixing missing extension of changelog fragment

* Adding issue link to changelog fragment

* Update changelogs/fragments/8183-from_ini_to_ini.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
Steffen Scheib 2024-04-09 08:01:44 +02:00 committed by GitHub
commit 9307b76e74
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 19 additions and 4 deletions

View file

@ -57,7 +57,7 @@ class IniParser(ConfigParser):
''' Implements a configparser which is able to return a dict '''
def __init__(self):
super().__init__()
super().__init__(interpolation=None)
self.optionxform = str
def as_dict(self):

View file

@ -63,7 +63,7 @@ class IniParser(ConfigParser):
''' Implements a configparser which sets the correct optionxform '''
def __init__(self):
super().__init__()
super().__init__(interpolation=None)
self.optionxform = str