mikedh / trimesh

Python library for loading and using triangular meshes.
https://trimesh.org
MIT License
3.02k stars 583 forks source link

Fix typing bug in merge_vertices function #2281

Closed ayersb closed 2 months ago

ayersb commented 2 months ago

Small typing bug that got flagged by pyright when my team updated trimesh recently.

The python typing for a few arguments is Optional[bool] when it should be Optional[int] based on the type comments and downstream code.

mikedh commented 2 months ago

Thanks for the fix!! I also added the corrected hints to trimesh.grouping.merge_vertices and updated the type to trimesh.typed.Integer which includes numpy.int64 in addition to Python int etc in https://github.com/mikedh/trimesh/pull/2278/commits/c5b9a6b7618c262e340de6d1b0d8da49751b459f