wemake-services / wemake-django-template

Bleeding edge django template focused on code quality and security.

Home Page:https://wemake-django-template.rtfd.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mypy complaints for custum settings: 'Settings' object has no attribute 'TESTXYZ'

stevenengland opened this issue · comments

Hi at all,

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