tide icon indicating copy to clipboard operation
tide copied to clipboard

Feature Request: Finish statically typing the API

Open drewm1980 opened this issue 2 years ago • 1 comments

To start, the type annotations in your code are a huge advantage of this over pycocotools; thanks for adding annotations!

That said, some arguments to API functions are not fully statically typed. The type instability in the pycocotools API is unfortunate, but in your wrapper you can use Union types to, i.e. represent the switching between compressed and non-compressed masks in overloaded methods Data.add*

Thanks!

drewm1980 avatar Nov 25 '21 14:11 drewm1980

I am also spending a lot of time figuring out what the output types of your functions are. It would be nice to have static types for the outputs of: TIDE.get_*_errors instead of deeply nested mystery dicts. Note that I'm talking about actual types(classes) with statically known field names, not annotating the outputs as Dict or Dict[Dict[object, object]].

drewm1980 avatar Nov 25 '21 15:11 drewm1980