Skip to content

Commit 4ed5f06

Browse files
committed
Add docstring
1 parent e2891c0 commit 4ed5f06

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/bootstrap/configure.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -739,6 +739,10 @@ def configure_file(sections, top_level_keys, targets, config):
739739

740740

741741
def write_uncommented(target, f):
742+
"""Writes each block in 'target' that is not composed entirely of comments to 'f'.
743+
744+
A block is a sequence of non-empty lines separated by empty lines.
745+
"""
742746
block = []
743747
is_comment = True
744748

@@ -753,9 +757,9 @@ def write_uncommented(target, f):
753757
continue
754758
is_comment = is_comment and line.startswith("#")
755759
# Write the last accumulated block
756-
if len(block) > 0 and not is_comment:
757-
for ln in block:
758-
f.write(ln + "\n")
760+
#if len(block) > 0 and not is_comment:
761+
# for ln in block:
762+
# f.write(ln + "\n")
759763
return f
760764

761765

0 commit comments

Comments
 (0)