Skip to content

Commit 82522f8

Browse files
committed
handle what Gemini suggested
1 parent 074f623 commit 82522f8

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

python/private/pypi/whl_metadata.bzl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,11 @@ def _parse_entry_points(contents):
143143
if not start:
144144
continue
145145

146-
if start and not line:
146+
if start and line.startswith("["):
147147
break
148148

149149
line, _, _comment = line.partition("#")
150+
line = line.strip()
150151
if not line:
151152
continue
152153

tests/pypi/whl_metadata/whl_metadata_tests.bzl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,8 @@ interesting # with comments
188188
foo = foomod:main
189189
# One which depends on extras:
190190
foobar = importable.foomod:main_bar [bar, baz]
191-
# With a comment at the end
191+
192+
# With a comment at the end
192193
foobarbaz = foomod:main.attr # comment
193194
194195
[something else]

0 commit comments

Comments
 (0)