When I have a string format in an unrelated section in pyproject.toml, radon crashes with the following message:
Traceback (most recent call last):
File "/Users/mkj/.local/bin/radon", line 8, in <module>
sys.exit(main())
^^^^^^
File "/Users/mkj/.local/pipx/venvs/radon/lib/python3.11/site-packages/radon/__init__.py", line 10, in main
from radon.cli import program, log_error
File "/Users/mkj/.local/pipx/venvs/radon/lib/python3.11/site-packages/radon/cli/__init__.py", line 90, in <module>
_cfg = FileConfig()
^^^^^^^^^^^^
File "/Users/mkj/.local/pipx/venvs/radon/lib/python3.11/site-packages/radon/cli/__init__.py", line 45, in __init__
self.file_cfg = self.file_config()
^^^^^^^^^^^^^^^^^^
File "/Users/mkj/.local/pipx/venvs/radon/lib/python3.11/site-packages/radon/cli/__init__.py", line 85, in file_config
config.read_dict(FileConfig.toml_config())
File "/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/configparser.py", line 770, in read_dict
self.set(section, key, value)
File "/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/configparser.py", line 1220, in set
super().set(section, option, value)
File "/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/configparser.py", line 910, in set
value = self._interpolation.before_set(self, section, option,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/configparser.py", line 403, in before_set
raise ValueError("invalid interpolation syntax in %r at "
ValueError: invalid interpolation syntax in '%(lineno)d' at position 0
When I have a string format in an unrelated section in pyproject.toml, radon crashes with the following message:
My minimal example config:
I have encountered this when upgrading to radon 6.0.1 while using a custom
log_formatoption in a pytest configuration section.