datumaro
datumaro copied to clipboard
Update type definitions wrt new attrs features
Review and update extractor.py
and other files.
Changed in version 21.1.0: init=False injects __attrs_init__
Should fix our class patching in Bbox.
There are more things we can do:
- utilize the new library API (https://www.attrs.org/en/stable/api.html#next-generation-apis): define, field, frozen
- remove
repr_ns
in nested classes
Maybe, we can refactor Config
using attrs, it would be very nice.
FWIW, the attrs changelog promises that in the next release you'll be able to "import attrs
", so I think we should wait and see what that's like before doing a mass refactoring. My assumption is that it'll be a package with just the new generation API in it, so it'll be easier to remove old API usage if we switch to it.