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
As you are probably well aware of, a part of the reason for picking TOML and YAML as configuration languages, is the ability to comment these files.
Problem
Nitpick parses its toml style files and strips the comments of the generated files, ence making the devs having to go to the source nitpick styles to know why a configuration option was set.
Example:
# flakehell.toml
["pyproject.toml".tool.flakehell.plugins]
# E203: See https://github.com/PyCQA/pycodestyle/issues/373pycodestyle = ["+*", "-E203",]
Thanks for your suggestion, it's definitely useful. 🙂
I think this is possible indeed.
I don't remember exactly how sdispater/tomlkit identifies comments, if this is configurable or not...
A certain convention should be used though. In your example:
# Comment above a section belongs to the section
["pyproject.toml".tool.flakehell.plugins]
# Comment inside a section belongs to the value below:
pycodestyle = ["+*", "-E203",]
# Comments at the end of the file would be ignored because there is nothing below
As you are probably well aware of, a part of the reason for picking TOML and YAML as configuration languages, is the ability to comment these files.
Problem
Nitpick parses its toml style files and strips the comments of the generated files, ence making the devs having to go to the source nitpick styles to know why a configuration option was set.
Example:
Generated
pyproject.toml
:Possible solution
Keep comments from the style files.
The alternative (that we currently use) is adding a
which makes us return to the dark ages of doing the same in the
composer.json
orpackage.json
files, 😄 .The text was updated successfully, but these errors were encountered: