aws-samples / amazon-textract-response-parser

Parse JSON response of Amazon Textract
Apache License 2.0
218 stars 95 forks source link

`TGeometry.rotate`: Pass degrees to `TPoint.rotate` #185

Open jonnyarnold opened 2 months ago

jonnyarnold commented 2 months ago

There was a bug where TGeometry.rotate didn't pass the degrees parameter to TPoint.rotate, meaning that calls to TGeometry.rotate (and TDocument.rotate) only ever rotated the polygon by 180 degrees.

Potential fix for #133?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

athewsey commented 1 month ago

Thanks for proposing! This seems like a sensible & small fix to me... Any chance you could add a unit test? It seems like the current ones in test_trp2.py only look at TPoint.rotate which is probably why this fell through the cracks.