From b8a091ae7055dd949d193695a06c9536ad51eea8 Mon Sep 17 00:00:00 2001 From: John Collins Date: Sat, 16 Dec 2023 05:36:53 -0800 Subject: [PATCH] Turn off doc-string line wrapping (#532) --- src/betterproto/plugin/models.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/betterproto/plugin/models.py b/src/betterproto/plugin/models.py index c773381..93b2aa8 100644 --- a/src/betterproto/plugin/models.py +++ b/src/betterproto/plugin/models.py @@ -157,10 +157,7 @@ def get_comment( pad = " " * indent for sci_loc in proto_file.source_code_info.location: if list(sci_loc.path) == path and sci_loc.leading_comments: - lines = textwrap.wrap( - sci_loc.leading_comments.strip().replace("\n", ""), width=79 - indent - ) - + lines = sci_loc.leading_comments.strip().split("\n") # This is a field, message, enum, service, or method if len(lines) == 1 and len(lines[0]) < 79 - indent - 6: lines[0] = lines[0].strip('"')