From 55ea304ff338f249914b95938675a4e9b07d0875 Mon Sep 17 00:00:00 2001 From: lukasprobst Date: Mon, 25 Oct 2021 22:32:54 +0200 Subject: [PATCH] Disable interpolation of ConfigParser --- CHANGELOG.md | 3 +++ CONFIG.md | 6 +++--- LICENSE | 2 +- PFERD/__main__.py | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 522d96d..a90c978 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,9 @@ ambiguous situations. ### Added - A KIT IPD crawler +### Removed +- [Interpolation](https://docs.python.org/3/library/configparser.html#interpolation-of-values) in config file + ## 3.2.0 - 2021-08-04 ### Added diff --git a/CONFIG.md b/CONFIG.md index 06b9246..4d2ec33 100644 --- a/CONFIG.md +++ b/CONFIG.md @@ -4,11 +4,11 @@ A config file consists of sections. A section begins with a `[section]` header, which is followed by a list of `key = value` pairs. Comments must be on their own line and start with `#`. Multiline values must be indented beyond their key. Boolean values can be `yes` or `no`. For more details and some examples on the -format, see the [configparser documentation][1] ([basic interpolation][2] is -enabled). +format, see the [configparser documentation][1] ([interpolation][2] is +disabled). [1]: "Supported INI File Structure" -[2]: "BasicInterpolation" +[2]: "Interpolation of values" ## The `DEFAULT` section diff --git a/LICENSE b/LICENSE index 01f15f5..c096c4a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright 2019-2020 Garmelon, I-Al-Istannen, danstooamerican, pavelzw, TheChristophe, Scriptim +Copyright 2019-2021 Garmelon, I-Al-Istannen, danstooamerican, pavelzw, TheChristophe, Scriptim, thelukasprobst Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/PFERD/__main__.py b/PFERD/__main__.py index b665feb..bdf5b34 100644 --- a/PFERD/__main__.py +++ b/PFERD/__main__.py @@ -15,7 +15,7 @@ from .transformer import RuleParseError def load_config_parser(args: argparse.Namespace) -> configparser.ConfigParser: log.explain_topic("Loading config") - parser = configparser.ConfigParser() + parser = configparser.ConfigParser(interpolation=None) if args.command is None: log.explain("No CLI command specified, loading config from file")