Add setup.cfg for QA tools, fix flake8 warnings

This commit is contained in:
Jan Dittberner 2016-01-31 23:29:56 +01:00
parent ed18c4a6f9
commit 32366e93dd
6 changed files with 62 additions and 43 deletions

1
.gitignore vendored
View file

@ -42,3 +42,4 @@ Desktop.ini
_build/ _build/
.vagrant/ .vagrant/
.coverage .coverage
coverage-report/

View file

@ -51,11 +51,11 @@ path.append(DJANGO_ROOT)
DEBUG = False DEBUG = False
# ######### MANAGER CONFIGURATION # ######### MANAGER CONFIGURATION
# See: https://docs.djangoproject.com/en/dev/ref/settings/#admins # See: https://docs.djangoproject.com/en/dev/ref/settings/#admins
ADMINS = ( ADMINS = (
(get_env_variable('GVALDAP_ADMIN_NAME'), get_env_variable('GVALDAP_ADMIN_EMAIL')), (get_env_variable('GVALDAP_ADMIN_NAME'),
get_env_variable('GVALDAP_ADMIN_EMAIL')),
) )
# See: https://docs.djangoproject.com/en/dev/ref/settings/#managers # See: https://docs.djangoproject.com/en/dev/ref/settings/#managers
@ -119,7 +119,8 @@ MEDIA_URL = '/media/'
# See: https://docs.djangoproject.com/en/dev/ref/settings/#static-url # See: https://docs.djangoproject.com/en/dev/ref/settings/#static-url
STATIC_URL = '/static/' STATIC_URL = '/static/'
# See: https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#staticfiles-finders # See:
# https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#staticfiles-finders # noqa
STATICFILES_FINDERS = ( STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.AppDirectoriesFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
) )
@ -141,7 +142,8 @@ ALLOWED_HOSTS = []
# ######### FIXTURE CONFIGURATION # ######### FIXTURE CONFIGURATION
# See: https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-FIXTURE_DIRS # See:
# https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-FIXTURE_DIRS # noqa
FIXTURE_DIRS = ( FIXTURE_DIRS = (
normpath(join(SITE_ROOT, 'fixtures')), normpath(join(SITE_ROOT, 'fixtures')),
) )

View file

@ -37,7 +37,7 @@ CACHES = {
# ######### TOOLBAR CONFIGURATION # ######### TOOLBAR CONFIGURATION
# See: http://django-debug-toolbar.readthedocs.org/en/latest/installation.html#explicit-setup # See: http://django-debug-toolbar.readthedocs.org/en/latest/installation.html#explicit-setup # noqa
INSTALLED_APPS += ( INSTALLED_APPS += (
'debug_toolbar', 'debug_toolbar',
) )

View file

@ -26,10 +26,10 @@ path.append(SITE_ROOT)
# os.environ["DJANGO_SETTINGS_MODULE"] = "jajaja.settings" # os.environ["DJANGO_SETTINGS_MODULE"] = "jajaja.settings"
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "gvaldap.settings.production") os.environ.setdefault("DJANGO_SETTINGS_MODULE", "gvaldap.settings.production")
from django.core.wsgi import get_wsgi_application
# This application object is used by any WSGI server configured to use this # This application object is used by any WSGI server configured to use this
# file. This includes Django's development server, if the WSGI_APPLICATION # file. This includes Django's development server, if the WSGI_APPLICATION
# setting points here. # setting points here.
from django.core.wsgi import get_wsgi_application # noqa
application = get_wsgi_application() application = get_wsgi_application()
# Apply WSGI middleware here. # Apply WSGI middleware here.

16
gvaldap/setup.cfg Normal file
View file

@ -0,0 +1,16 @@
[pep8]
exclude = migrations
[flake8]
exclude = migrations
[coverage:run]
source = gvaldap,ldapentities,ldaptasks
branch = True
[coverage:report]
omit = */migrations/*,*/tests/*.py,*/tests.py,gvaldap/settings/local.py,gvaldap/settings/production.py
show_missing = True
[coverage:html]
directory = ../coverage-report