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
if I add a custom setting to for example test-project/server/settings/components/common.py
common.py
TESTXYZ = "test"
reference it somewhere like in test-project/server/apps/main/views.py
xyz = settings.TESTXYZ
and if I then run mypy . I get the complaint: server/apps/main/views.py:14: error: 'Settings' object has no attribute 'TESTXYZ' [misc]
-> Is it just me hitting this error or is there a real issue?
I think this is might be because django-stubs not supporting custom vars. Am I mistaken here? If this is a general issue or even a not supported scenario: What might be a good practice to "get rid" of the mypy errors for settings?
Kind regards
The text was updated successfully, but these errors were encountered:
Hi at all,
if I add a custom setting to for example
test-project/server/settings/components/common.py
reference it somewhere like in
test-project/server/apps/main/views.py
and if I then run
mypy .
I get the complaint:server/apps/main/views.py:14: error: 'Settings' object has no attribute 'TESTXYZ' [misc]
-> Is it just me hitting this error or is there a real issue?
I think this is might be because django-stubs not supporting custom vars. Am I mistaken here? If this is a general issue or even a not supported scenario: What might be a good practice to "get rid" of the mypy errors for settings?
Kind regards
The text was updated successfully, but these errors were encountered: