sbdchd / django-types

:doughnut: Type stubs for Django
MIT License
202 stars 63 forks source link

"models" is unknown import symbol #273

Open codelotusr opened 1 week ago

codelotusr commented 1 week ago

I have pyright installed, I am working with Neovim. When I try to use django-types it throws '"models" is unknown import symbol' on the line 'from django.db import models'. When I use django-stubs instead, it works perfectly fine.

image

sbdchd commented 1 week ago

when you run your type checker on the command line does it have the same issue?

codelotusr commented 5 days ago

I've tried restarting the device itself, the issue still persisted. Though, when I ran Pyright on the command line, it didn't prompt any errors. I've since changed my dependency manager to Poetry and it's working without any issues now. I am not sure what the problem was, my guess is some weird caching issue. I tested on another device with almost the exact same setup and I couldn't get the issue to repeat itself.