Skip to content

bpo-35885: configparser indent #18522

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

Closed
wants to merge 15 commits into from

Conversation

idomic
Copy link
Contributor

@idomic idomic commented Feb 16, 2020

@idomic idomic changed the title Bpo-35885 configparser indent bpo-35885: configparser indent Feb 16, 2020
@idomic
Copy link
Contributor Author

idomic commented Feb 23, 2020

Adding @taleinat

@codecov
Copy link

codecov bot commented Feb 23, 2020

Codecov Report

Merging #18522 into master will decrease coverage by 0.12%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #18522      +/-   ##
==========================================
- Coverage   82.20%   82.07%   -0.13%     
==========================================
  Files        1958     1955       -3     
  Lines      589743   584080    -5663     
  Branches    44457    44458       +1     
==========================================
- Hits       484772   479364    -5408     
+ Misses      95308    95089     -219     
+ Partials     9663     9627      -36     
Impacted Files Coverage Δ
Lib/distutils/tests/test_bdist_rpm.py 30.00% <0.00%> (-65.00%) ⬇️
Lib/distutils/command/bdist_rpm.py 7.63% <0.00%> (-56.88%) ⬇️
Modules/_decimal/libmpdec/umodarith.h 80.76% <0.00%> (-19.24%) ⬇️
Lib/test/test_urllib2net.py 76.92% <0.00%> (-13.85%) ⬇️
Lib/test/test_smtpnet.py 78.57% <0.00%> (-12.86%) ⬇️
Lib/ftplib.py 63.85% <0.00%> (-6.06%) ⬇️
Lib/test/test_ftplib.py 87.11% <0.00%> (-4.72%) ⬇️
Tools/scripts/db2pickle.py 17.82% <0.00%> (-3.97%) ⬇️
Tools/scripts/pickle2db.py 16.98% <0.00%> (-3.78%) ⬇️
Lib/test/test_socket.py 71.94% <0.00%> (-3.87%) ⬇️
... and 340 more

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 c33bdbb...9b57c26. Read the comment docs.

Write the configuration state in .ini format. If
`space_around_delimiters' is True (the default), delimiters
between keys and values are surrounded by spaces.

If `indent' is empty (the default), the keys won't be indented.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doc-string needs to mention what will happen when indent is set to a non-empty value.

@@ -0,0 +1,3 @@
:class:`configparser` :func:`write()` method have a new parameter `indent` of type string.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
:class:`configparser` :func:`write()` method have a new parameter `indent` of type string.
Add a new parameter ``indent`` to :meth:`configparser.write()`.

@@ -0,0 +1,3 @@
:class:`configparser` :func:`write()` method have a new parameter `indent` of type string.
When indent is set, the parser will indent the lines according to the given input value.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO this is too much information for the NEWS entry, but something like this should be added to the doc-string.

@@ -0,0 +1,3 @@
:class:`configparser` :func:`write()` method have a new parameter `indent` of type string.
When indent is set, the parser will indent the lines according to the given input value.
Contributed by Ido Michael in :issue:`35885`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Contributed by Ido Michael in :issue:`35885`
Contributed by Ido Michael.

@bedevere-bot
Copy link

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@taleinat
Copy link
Contributor

@idomic, something with how you're managing your PR branches is very problematic. Would you mind closing this PR and opening a new, clean one?

@idomic idomic closed this Feb 23, 2020
@idomic idomic deleted the bpo-35885-configparserIndent branch February 23, 2020 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants