diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..2a0e09d --- /dev/null +++ b/.flake8 @@ -0,0 +1,4 @@ +[flake8] +ignore = W3921 +max-line-length = 80 +exclude = */tests/* */settings/* diff --git a/.travis.yml b/.travis.yml index a85fe0d..acd251c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,7 @@ before_script: - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter - chmod +x ./cc-test-reporter - ./cc-test-reporter before-build + - find ./authors/ -name \*.py -exec flake8 -v {} + # command to run tests script: diff --git a/authors/settings/base.py b/authors/settings/base.py index 27fa099..e42cee7 100644 --- a/authors/settings/base.py +++ b/authors/settings/base.py @@ -11,7 +11,7 @@ """ import os -from decouple import config, Csv +from decouple import config # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) @@ -20,7 +20,7 @@ # See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = config('SECRET_KEY', default = '#dfhewy73twy3e88Y@Y828Y@91') +SECRET_KEY = config('SECRET_KEY', default='#dfhewy73twy3e88Y@Y828Y@91') # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True diff --git a/authors/settings/dev.py b/authors/settings/dev.py index 3ae2be6..a3de949 100644 --- a/authors/settings/dev.py +++ b/authors/settings/dev.py @@ -1,4 +1,3 @@ -import os from authors.settings.base import * # SECURITY WARNING: don't run with debug turned on in production! @@ -10,9 +9,9 @@ DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', - 'NAME': config('DB_NAME', default = 'legion_backend'), - 'USER': config('DB_USER', default = 'legion'), - 'PASSWORD': config('DB_PASSWORD', default = '&L3g10n'), + 'NAME': config('DB_NAME', default='legion_backend'), + 'USER': config('DB_USER', default='legion'), + 'PASSWORD': config('DB_PASSWORD', default='&L3g10n'), 'HOST': config('DB_HOST'), 'PORT': '', } diff --git a/authors/settings/staging.py b/authors/settings/staging.py index 3f1a82b..6720874 100644 --- a/authors/settings/staging.py +++ b/authors/settings/staging.py @@ -1,4 +1,3 @@ -import os from authors.settings.base import * # SECURITY WARNING: don't run with debug turned on in production! @@ -8,9 +7,9 @@ DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', - 'NAME': config('DB_NAME', default = 'legion_backend'), - 'USER': config('DB_USER', default = 'legion'), - 'PASSWORD': config('DB_PASSWORD', default = '&L3g10n'), + 'NAME': config('DB_NAME', default='legion_backend'), + 'USER': config('DB_USER', default='legion'), + 'PASSWORD': config('DB_PASSWORD', default='&L3g10n'), 'HOST': config('DB_HOST'), 'PORT': '', } diff --git a/requirements.txt b/requirements.txt index 3b5e7d9..9491882 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,7 @@ +astroid==2.2.0 +autopep8==1.4.3 +certifi==2018.11.29 +chardet==3.0.4 coverage==4.5.2 coveralls==1.6.0 dj-database-url==0.5.0 @@ -5,8 +9,24 @@ Django==2.1.7 django-cors-middleware==1.3.1 django-extensions==2.1.6 djangorestframework==3.9.1 +docopt==0.6.2 +entrypoints==0.3 +flake8==3.7.7 gunicorn==19.9.0 +idna==2.8 +isort==4.3.9 +lazy-object-proxy==1.3.1 +mccabe==0.6.1 psycopg2-binary==2.7.7 +pycodestyle==2.5.0 +pyflakes==2.1.0 PyJWT==1.4.2 +pylint==2.3.0 python-decouple==3.1 +pytz==2018.9 +requests==2.21.0 +six==1.10.0 +typed-ast==1.3.1 +urllib3==1.24.1 whitenoise==4.1.2 +wrapt==1.11.1