Closed macisamuele closed 2 years ago
Merging #106 (7c2da19) into master (9b73ca2) will not change coverage. The diff coverage is
100.00%
.
@@ Coverage Diff @@
## master #106 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 10 10
Lines 316 314 -2
=========================================
- Hits 316 314 -2
Impacted Files | Coverage Δ | |
---|---|---|
...e_formatters_pre_commit_hooks/pretty_format_ini.py | 100.00% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 9b73ca2...7c2da19. Read the comment docs.
Thanks @Delgan for your effort.
⚠: This PR is in draft mode as some details still need to be addressed, once for all the following ini file is considered invalid ¯_(ツ)_/¯
This PR aims to address the ini parsing regression identified in #99.
The regression, as mentioned in the issue, was caused by the fact that we were hacking around to preserve comments in ini files.
In the original issue, #26, there was a possible recommendation on using
configobj
library as alternative.After some analysis I came to realise that the suggested library is actually ensuring that the generated output is valid, proper indentation is enforced and comments are preserved.
Notable changes from this PR is that ini files like
would no longer be considered pretty because ini files need always to have sections, and if the section is missing then
root
is assumed. With the new change, the default section would still be made explicit, hencewould be the prettified version of the previous content
Closes #99 and #100