zostera / django-modeltrans

Translate Django model fields in a PostgreSQL JSONField
http://django-modeltrans.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
65 stars 10 forks source link

Type checking error with `TranslationField` #96

Open browniebroke opened 1 year ago

browniebroke commented 1 year ago

I'm using mypy and django-stubs to do type checking in my projects and I noticed that as I soon as I add a TranslationField on a model, I get an error from mypy:

error: Could not resolve manager type for "myapp.models.Industry.objects"  [django-manager-missing]

I'm not sure yet if it's a problem with this library, mypy of django-stubs. Does this problem ring a bell? I'll try to put together a minimal project that reproduces the issue.

browniebroke commented 1 year ago

I've reproduced the problem in a minimal project. Last mypy check before adding the library worked, and it failed after adding it.

browniebroke commented 1 year ago

FYI, it might be a bug in django-stubs: https://github.com/typeddjango/django-stubs/issues/1023