Keep toml file indent while executing pdm command
See original GitHub issueBefore I ran pdm add -d xxx
, it looks like this:
And after:
Is it possible to keep the brackets aligned?
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:6
Top Results From Across the Web
A style guide for toml? · Issue #608 - GitHub
Indent is elegant and clear. Personally, I use indent to make the structure of the file very clear. And I use vim and...
Read more >r - blogdown indentation for TOML tables - in particular the ...
I'm confused by the indentation of the [params.logo] table, five lines from the end of the file. Shouldn't this [params.logo] table be non- ......
Read more >yamlfix
A simple opinionated yaml formatter that keeps your comments! ... run yamlfix with two config files yamlfix -c base.toml --config-file ...
Read more >How to Manage Configurations Easily Using TOML Files
We can configure the node environment, the build command, the output directory, etc., in this config file. Another good example is the GitLab ......
Read more >What is wrong with TOML? - HitchDev
TOML is a configuration designed as a sort of "improved" INI file. It's analogous to this project - StrictYAML, a similar attempt to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It is not the same as described in this issue. PDM doesn’t keep the indentation length on
add
but rather normalizes it to 4 spaces, we are not changing this.Yes, I was going to mention that since you already use tomlkit it shouldn’t be difficult to keep formatting. Also, how does changing indentation reduce diff noise? If anything it increases it (though generally whitespace diffs can be suppressed).
As for black, I find it’s useful as a single pass to clean up a really messy code base, but I tried using it as a pre-commit hook for a while and found some cases where it seemed to make my code uglier / harder to read than before, opinionated formatting aside (they even managed to convince me to use double instead of single quotes). But this is off-topic so I’ll end it here.