Skip to content

Commit b8a091a

Browse files
Turn off doc-string line wrapping (#532)
1 parent d34b169 commit b8a091a

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/betterproto/plugin/models.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,7 @@ def get_comment(
157157
pad = " " * indent
158158
for sci_loc in proto_file.source_code_info.location:
159159
if list(sci_loc.path) == path and sci_loc.leading_comments:
160-
lines = textwrap.wrap(
161-
sci_loc.leading_comments.strip().replace("\n", ""), width=79 - indent
162-
)
163-
160+
lines = sci_loc.leading_comments.strip().split("\n")
164161
# This is a field, message, enum, service, or method
165162
if len(lines) == 1 and len(lines[0]) < 79 - indent - 6:
166163
lines[0] = lines[0].strip('"')

0 commit comments

Comments
 (0)