mirror of
https://github.com/TECHNOFAB11/bumpver.git
synced 2025-12-12 14:30:09 +01:00
Convert regular format strings to f-strings
This fixes the 'consider-using-f-string' pylint warnings
This commit is contained in:
parent
48da0a51bf
commit
b3e7228189
2 changed files with 10 additions and 10 deletions
|
|
@ -276,9 +276,9 @@ def _update_config_val(filename, **kwargs):
|
|||
|
||||
new_cfg_text = old_cfg_text
|
||||
for key, val in kwargs.items():
|
||||
replacement = "{} = {}".format(key, val)
|
||||
replacement = f"{key} = {val}"
|
||||
if replacement not in new_cfg_text:
|
||||
pattern = r"^{} = .*$".format(key)
|
||||
pattern = fr"^{key} = .*$"
|
||||
new_cfg_text = re.sub(pattern, replacement, new_cfg_text, flags=re.MULTILINE)
|
||||
assert old_cfg_text != new_cfg_text
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue