You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I have a very unusual use case. It's ok if this issue doesn't end up being resolved but I figured I'd report it just in case.
Basically, I have a Django project, let's say it's a package called myproject, and it has a settings module at myproject.settings. The idiomatic Django way to expose these settings is via a from djang.conf import settings import, but these settings are largely just an alias to my own settings module. So as a quick win for strong typing, I thought I'd make a stub for django.conf.settings that looked like this:
So the stub is pointing back at my first-party code, which is probably unexpected. This used to work fine all the time before mypy introduced incremental mode, but now that it defaults to incremental mode, I've noticed that I have to delete my .mypy_cache directory whenever I change typings in myproject.settings--otherwise mypy thinks that the typings for django.conf.settings are the stale version.
Anyhow, like I said, this is a very weird use case and probably not worth your time, but I figured I'd report it just in case.
The text was updated successfully, but these errors were encountered:
Hey, sorry for the super late response here--this bug has definitely been fixed as of 0.641 (or possibly earlier than that). I upgraded and editing my first-party settings.py code is now instantaneously reflected into my settings.pyi stub, so thanks for fixing this!
Hi, I have a very unusual use case. It's ok if this issue doesn't end up being resolved but I figured I'd report it just in case.
Basically, I have a Django project, let's say it's a package called
myproject
, and it has a settings module atmyproject.settings
. The idiomatic Django way to expose these settings is via afrom djang.conf import settings
import, but these settings are largely just an alias to my own settings module. So as a quick win for strong typing, I thought I'd make a stub fordjango.conf.settings
that looked like this:So the stub is pointing back at my first-party code, which is probably unexpected. This used to work fine all the time before mypy introduced incremental mode, but now that it defaults to incremental mode, I've noticed that I have to delete my
.mypy_cache
directory whenever I change typings inmyproject.settings
--otherwise mypy thinks that the typings fordjango.conf.settings
are the stale version.Anyhow, like I said, this is a very weird use case and probably not worth your time, but I figured I'd report it just in case.
The text was updated successfully, but these errors were encountered: