-
Notifications
You must be signed in to change notification settings - Fork 471
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
codespell unhappy with pytest config in pyproject.toml #2544
Comments
This looks like an issue with the $ python3
Python 3.10.6 (main, Aug 10 2022, 11:40:04) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import configparser
>>>
>>> data = {
... 'foo': {
... 'x': '%Y'
... }
... }
>>>
>>> config = configparser.ConfigParser()
>>> config.read_dict(data)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.10/configparser.py", line 755, in read_dict
self.set(section, key, value)
File "/usr/lib/python3.10/configparser.py", line 1205, in set
super().set(section, option, value)
File "/usr/lib/python3.10/configparser.py", line 895, in set
value = self._interpolation.before_set(self, section, option,
File "/usr/lib/python3.10/configparser.py", line 402, in before_set
raise ValueError("invalid interpolation syntax in %r at "
ValueError: invalid interpolation syntax in '%Y' at position 0
>>> |
We used to read INI files with |
File pyproject.toml does not escape Note that
Unfortunately, it looks like there is no unique config file format – and no universal config file reader. So one has to try different formats with different interpolation schemes to read a config file, until it works. Ouch. |
Thinking about it again, perhaps we should pass |
When running codespell with this pyproject.toml I get the following error:
The text was updated successfully, but these errors were encountered: