You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ codespell
Traceback (most recent call last):
File "/Users/swhitlock/Library/Caches/pypoetry/virtualenvs/pyaud-MdtoMGJ6-py3.8/bin/codespell", line 8, in<module>sys.exit(_script_main())
File "/Users/swhitlock/Library/Caches/pypoetry/virtualenvs/pyaud-MdtoMGJ6-py3.8/lib/python3.8/site-packages/codespell_lib/_codespell.py", line 767, in _script_main
return main(*sys.argv[1:])
File "/Users/swhitlock/Library/Caches/pypoetry/virtualenvs/pyaud-MdtoMGJ6-py3.8/lib/python3.8/site-packages/codespell_lib/_codespell.py", line 772, in main
options, parser = parse_options(args)
File "/Users/swhitlock/Library/Caches/pypoetry/virtualenvs/pyaud-MdtoMGJ6-py3.8/lib/python3.8/site-packages/codespell_lib/_codespell.py", line 426, in parse_options
config.read_dict(data)
File "/Users/swhitlock/.pyenv/versions/3.8.13/lib/python3.8/configparser.py", line 754, in read_dict
self.set(section, key, value)
File "/Users/swhitlock/.pyenv/versions/3.8.13/lib/python3.8/configparser.py", line 1201, insetsuper().set(section, option, value)
File "/Users/swhitlock/.pyenv/versions/3.8.13/lib/python3.8/configparser.py", line 894, inset
value = self._interpolation.before_set(self, section, option,
File "/Users/swhitlock/.pyenv/versions/3.8.13/lib/python3.8/configparser.py", line 402, in before_set
raise ValueError("invalid interpolation syntax in %r at "
ValueError: invalid interpolation syntax in'%s' at position 0
So it appears that ConfigParser cannot handle the dictionary it is given
This is a problem, because the [tool.codespell] key does not need to be parsed for this to happen
If the syntax wasn't allowed in codespell that would be easier to mitigate
I propose that the tool.codespell key is parsed before it is passed to ConfigParser, if it must?
The text was updated successfully, but these errors were encountered:
Hi @DimitriPapadopoulos,
Sorry for opening a dupe, I was using the latest version for my pre-commitrev key, and not seeing any open issues I didn't know this had been spotted yet
This now works, thank you!
Hi there,
I'm getting
ValueError: invalid interpolation syntax in '%s' at position x
if I have%s
in my pyproject.tomlSteps to reproduce
So it appears that
ConfigParser
cannot handle the dictionary it is givenThis is a problem, because the
[tool.codespell]
key does not need to be parsed for this to happenIf the syntax wasn't allowed in
codespell
that would be easier to mitigateI propose that the
tool.codespell
key is parsed before it is passed toConfigParser
, if it must?The text was updated successfully, but these errors were encountered: