Fix python 3.7 -> 3.7-dev and add flake8 testing
Also fixed flake8 errors.
This commit is contained in:
+1
-1
@@ -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 "
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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__)))
|
||||
|
||||
|
||||
@@ -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')),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user