protobuf icon indicating copy to clipboard operation
protobuf copied to clipboard

How to get leading comments and tailing comments in python api?

Open wngus606 opened this issue 2 years ago • 1 comments

  • proto3
  • python

protoc -I=$SRC_DIR --python_out=$DST_DIR $SRC_DIR/addressbook.proto

If the protoc command is executed according to the protobuf guide, the addressbook_pb2.py file is created. I want to get comment information from the file, but there is no method to get SourceCodeInfo in python api. Is there a way?

wngus606 avatar Sep 24 '22 15:09 wngus606

I believe you need the --include_source_info flag.

googleberg avatar Oct 05 '22 20:10 googleberg

We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please add a comment.

This issue is labeled inactive because the last activity was over 90 days ago.

github-actions[bot] avatar Jan 01 '24 10:01 github-actions[bot]

We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please reopen it.

This issue was closed and archived because there has been no new activity in the 14 days since the inactive label was added.

github-actions[bot] avatar Jan 16 '24 10:01 github-actions[bot]