Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Read config file without interpolation (codespell-project#2545)
Some config files use interpolation, some do not: https://docs.python.org/3/library/configparser.html#interpolation-of-values Config files might contain occurrences of `%` that should not be interpolated. When attempting to interpolate them, `ConfigParser` crashes with: ValueError: invalid interpolation syntax Therefore, we decide to disable interpolation, to avoid crashes. We do not expect interpolation in the `[codespell]` section, so it is not a problem in practice. Alternatively, we could read with interpolation, and in the case of a ValueError exception, retry without interpolation. However, since we do not expect interpolation in the `[codespell]` section, I believe the current solution is simpler, faster, to the point.
- Loading branch information