flatbuffers icon indicating copy to clipboard operation
flatbuffers copied to clipboard

Add comparison operator to python objects under --gen-compare option

Open Alex-Ratcliffe opened this issue 3 years ago • 1 comments

When --gen-compare is selected this will add a comparison operator to the python classes created when the --gen-object-api is selected. This gives the expected behavior of working object comparisons in the generated code.

Alex-Ratcliffe avatar Oct 27 '22 21:10 Alex-Ratcliffe

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

google-cla[bot] avatar Oct 27 '22 21:10 google-cla[bot]

I would greatly appreciate if this could receive some attention, so that I can move off my fork for my organizations upstream project. While I realize that it is not recommend to use the object API and as such this isn't a priority, this does add expected behavior for the python generated code.

Alex-Ratcliffe avatar Nov 08 '22 23:11 Alex-Ratcliffe

Hi @Alex-Ratcliffe , I think it needs some tests

enum-class avatar Nov 09 '22 01:11 enum-class

Hi @Alex-Ratcliffe , I think it needs some tests

Yes Tests would be ideal, but it seems like the generated code is pretty obvious. Can you follow up with the typo and add tests in a follow up PR?

dbaileychess avatar Nov 11 '22 02:11 dbaileychess