Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Finish statically typing the API #36

Open
drewm1980 opened this issue Nov 25, 2021 · 1 comment
Open

Feature Request: Finish statically typing the API #36

drewm1980 opened this issue Nov 25, 2021 · 1 comment

Comments

@drewm1980
Copy link

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
Copy link
Author

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]].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant