Turn off doc-string line wrapping (#532)

This commit is contained in:
John Collins 2023-12-16 05:36:53 -08:00 committed by GitHub
parent d34b16993d
commit b8a091ae70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -157,10 +157,7 @@ def get_comment(
pad = " " * indent pad = " " * indent
for sci_loc in proto_file.source_code_info.location: for sci_loc in proto_file.source_code_info.location:
if list(sci_loc.path) == path and sci_loc.leading_comments: if list(sci_loc.path) == path and sci_loc.leading_comments:
lines = textwrap.wrap( lines = sci_loc.leading_comments.strip().split("\n")
sci_loc.leading_comments.strip().replace("\n", ""), width=79 - indent
)
# This is a field, message, enum, service, or method # This is a field, message, enum, service, or method
if len(lines) == 1 and len(lines[0]) < 79 - indent - 6: if len(lines) == 1 and len(lines[0]) < 79 - indent - 6:
lines[0] = lines[0].strip('"') lines[0] = lines[0].strip('"')