Closed GlennOlsson closed 3 years ago
Thanks for the feedback!
I added a field in the tests as you mentioned but am getting an error I cannot wrap my head around, the same found in the CircleCI log. Not sure why the db_field
is being set by the Enum parameter at all, do you have any idea why? I have tried removing the db_field
from the EnumField
initialisers but the same error appears, meaning that it is not derived from my code but probably from the mongoengine
or pymongo
library would be my guess. Have you encountered this before or have any tips?
There were a couple issues, one is that pyright doesn't like overloads via __init__
but for some reason those are working for other fields. In this case we overload
__new__
so that both pyright
and mypy
are happy.
After fixing that pyright
and mypy
complained about some overlapping overload
s so I updated them to using a required keyword args via *
, which allows us to avoid having them as default ...
which was causing the overlap.
Alright, thanks a lot!
Add missing typing for
register_connection
andEnumField
according to API forregister_connection
and the source forEnumField