Closed Cabalist closed 4 years ago
This line will fail if someone provides a 2D point in the expected format of a Tuple. I think this code could be replaced a few different ways but I wanted to check in if this wasn't just an incorrect assumption on typing.
No, you're exactly correct that that's a bug waiting to happen. Good luck with the type hinting there-- I had some now-regrettable habits of accepting and changing a lot of data types to others (e.g. 2-lists, 2-tuples, 3-lists, 3-tuples, euclid.Vec2's or euclid.Vec3's all easily get used, with the same variable name to result in euclid.Vec3, all over the vector code here. I'm not sure I'd like to dive in to getting everything in mypy-approved order here, but maybe you've done it?
Cleanup with the goal of adding type hints. They actually caught an issue too! See below.