mypy-protobuf icon indicating copy to clipboard operation
mypy-protobuf copied to clipboard

Add version to header comment.

Open jenstroeger opened this issue 3 years ago • 3 comments

It would be useful if the generated header comment would contain the version of the plugin, e.g.

"""
@generated by mypy-protobuf 3.3.0/libprotoc 3.19.5.  Do not edit manually!
isort:skip_file
"""

jenstroeger avatar Nov 29 '22 06:11 jenstroeger

Sounds like a great idea!

nipunn1313 avatar Nov 29 '22 17:11 nipunn1313

Thanks @nipunn1313! I’ve not looked through the code yet but do you prefer a PR contribution or is that a change you’ll make yourself?

jenstroeger avatar Nov 29 '22 18:11 jenstroeger

I would take a contribution!

Otherwise, I'd probably get around to it around christmastime. I like the idea as you've spec'd it.

The repo has tests (./run_tests.sh) with some existing generated files (eg https://github.com/nipunn1313/mypy-protobuf/blob/main/test/generated/testproto/test3_pb2.pyi) - so should be doable to update and review.

Change would likely go somewhere here https://github.com/nipunn1313/mypy-protobuf/blob/main/mypy_protobuf/main.py#L36

nipunn1313 avatar Nov 29 '22 20:11 nipunn1313