Fix python 3.7 -> 3.7-dev and add flake8 testing

Also fixed flake8 errors.
This commit is contained in:
Cristi Vîjdea
2017-12-02 23:48:58 +01:00
parent fed253aeed
commit 93c51b992d
12 changed files with 42 additions and 24 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ if __name__ == "__main__":
# issue is really that Django is missing to avoid masking other
# exceptions on Python 2.
try:
import django
import django # noqa: F401
except ImportError:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
-2
View File
@@ -1,3 +1 @@
from django.contrib import admin
# Register your models here.
+1 -2
View File
@@ -1,6 +1,5 @@
from rest_framework.status import HTTP_400_BAD_REQUEST
from rest_framework import serializers
from snippets.models import Snippet, LANGUAGE_CHOICES, STYLE_CHOICES
+2 -1
View File
@@ -1,9 +1,10 @@
import os
class PytestTestRunner(object):
"""Runs pytest to discover and run tests."""
def __init__(self, verbosity=1, failfast=False, keepdb=False, **kwargs):
def __init__(self, verbosity=1, failfast=False, keepdb=False, **_):
self.verbosity = verbosity
self.failfast = failfast
self.keepdb = keepdb
-2
View File
@@ -1,7 +1,5 @@
import os
import sys
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
+1 -1
View File
@@ -25,5 +25,5 @@ urlpatterns = [
url(r'^redoc/$', schema_view.with_ui('redoc', cache_timeout=None), name='schema-redoc'),
url(r'^admin/', admin.site.urls),
url(f'^snippets/', include('snippets.urls')),
url(r'^snippets/', include('snippets.urls')),
]