Enable pylint and autocomplete support for IDEs
proapi opened this issue · 0 comments
proapi commented
Hi,
after switching to django-split-settings, and setting up the project with examples supplied in the documentation I have a problem, because my pylint configuration is complaining about missing attributes inside settings module:
************* Module xxx
xxx.py:114:23: E1101: Module 'project.settings' has no 'DEBUG' member (no-member)
I also don't have autocomplete within PyCharm/VSCode.
Anything that I can do to import all of the settings when checking the code?
Here is my init.py inside settings module:
"""
This is a django-split-settings main file.
For more information read this:
https://github.com/sobolevn/django-split-settings
Default environment is `developement`.
To change settings file:
`DJANGO_ENV=production python manage.py runserver`
"""
from os import environ
from split_settings.tools import include
from split_settings.tools import optional
ENV = environ.get("DJANGO_ENV") or "development"
base_settings = [
"components/django.py",
"components/database.py",
"components/emails.py",
# Select the right env:
f"environments/{ENV}.py",
# Optionally override some settings:
optional("environments/local.py"),
]
# Include settings:
include(*base_settings)
Looking forward for a reply! Have a good day! :)