From 6cd06f6c8a68f039f88ef82e09d8cf9faa8ef51c Mon Sep 17 00:00:00 2001 From: dadosch Date: Fri, 24 Aug 2018 21:52:27 +0200 Subject: [PATCH] improved codestyle, go back to == in requirements --- requirements.txt | 106 ++++++++++++++++++++-------------------- src/documents/admin.py | 2 +- src/documents/models.py | 2 +- src/paperless/urls.py | 4 +- src/reminders/models.py | 4 +- 5 files changed, 61 insertions(+), 57 deletions(-) diff --git a/requirements.txt b/requirements.txt index 69c1afd48..23fab569f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,53 +1,53 @@ -apipkg>=1.4 -attrs>=18.1.0 -certifi>=2018.4.16 -chardet>=3.0.4 -coverage>=4.5.1 -coveralls>=1.3.0 -dateparser>=0.7.0 -django-cors-headers>=2.4.0 -django-crispy-forms>=1.7.2 -django-extensions>=2.0.7 -django-filter>=2.0.0 -django-flat-responsive>=2.0 -django>=2.1 -djangorestframework>=3.8.2 -docopt>=0.6.2 -execnet>=1.5.0 -factory-boy>=2.11.1 -faker>=0.8.15 -filemagic>=1.6 -flake8>=3.5.0 -fuzzywuzzy>=0.15.0 -gunicorn>=19.8.1 -idna>=2.6 -inotify_simple>=1.1.7; sys_platform == 'linux' -langdetect>=1.0.7 -mccabe>=0.6.1 -more-itertools>=4.1.0 -pdftotext>=2.0.2 -pillow>=5.1.0 -pluggy>=0.6.0 -py>=1.5.3 -pycodestyle>=2.3.1 -pyflakes>=1.6.0 -pyocr>=0.5.1 -pytest-cov>=2.5.1 -pytest-django>=3.2.1 -pytest-env>=0.6.2 -pytest-forked>=0.2 -pytest-sugar>=0.9.1 -pytest-xdist>=1.22.2 -pytest>=3.5.1 -python-dateutil>=2.7.3 -python-dotenv>=0.8.2 -python-gnupg>=0.4.2 -python-levenshtein>=0.12.0 -pytz>=2018.4 -regex>=2018.2.21 -requests>=2.18.4 -six>=1.11.0 -termcolor>=1.1.0 -text-unidecode>=1.2 -tzlocal>=1.5.1 -urllib3>=1.22 +apipkg==1.4 +attrs==18.1.0 +certifi==2018.4.16 +chardet==3.0.4 +coverage==4.5.1 +coveralls==1.3.0 +dateparser==0.7.0 +django-cors-headers==2.4.0 +django-crispy-forms==1.7.2 +django-extensions==2.0.7 +django-filter==2.0.0 +django-flat-responsive==2.0 +django>=2.0 +djangorestframework==3.8.2 +docopt==0.6.2 +execnet==1.5.0 +factory-boy==2.11.1 +faker==0.8.15 +filemagic==1.6 +flake8==3.5.0 +fuzzywuzzy==0.15.0 +gunicorn==19.8.1 +idna==2.6 +inotify_simple==1.1.7; sys_platform == 'linux' +langdetect==1.0.7 +mccabe==0.6.1 +more-itertools==4.1.0 +pdftotext==2.0.2 +pillow==5.1.0 +pluggy==0.6.0 +py==1.5.3 +pycodestyle==2.3.1 +pyflakes==1.6.0 +pyocr==0.5.1 +pytest-cov==2.5.1 +pytest-django==3.2.1 +pytest-env==0.6.2 +pytest-forked==0.2 +pytest-sugar==0.9.1 +pytest-xdist==1.22.2 +pytest==3.5.1 +python-dateutil==2.7.3 +python-dotenv==0.8.2 +python-gnupg==0.4.2 +python-levenshtein==0.12.0 +pytz==2018.4 +regex==2018.2.21 +requests==2.18.4 +six==1.11.0 +termcolor==1.1.0 +text-unidecode==1.2 +tzlocal==1.5.1 +urllib3==1.22 diff --git a/src/documents/admin.py b/src/documents/admin.py index 327aaab22..534f9143b 100644 --- a/src/documents/admin.py +++ b/src/documents/admin.py @@ -5,7 +5,7 @@ from django.contrib import admin from django.contrib.auth.models import User, Group try: from django.core.urlresolvers import reverse -except: +except ImportError: from django.urls import reverse from django.templatetags.static import static diff --git a/src/documents/models.py b/src/documents/models.py index ad7521abc..971451268 100644 --- a/src/documents/models.py +++ b/src/documents/models.py @@ -12,7 +12,7 @@ from fuzzywuzzy import fuzz from django.conf import settings try: from django.core.urlresolvers import reverse -except: +except ImportError: from django.urls import reverse from django.db import models from django.template.defaultfilters import slugify diff --git a/src/paperless/urls.py b/src/paperless/urls.py index 468bb768c..f66ce6664 100644 --- a/src/paperless/urls.py +++ b/src/paperless/urls.py @@ -28,7 +28,9 @@ urlpatterns = [ # API url( r"^api/auth/", - include(('rest_framework.urls','rest_framework'), namespace="rest_framework") + include( + ('rest_framework.urls', 'rest_framework'), + namespace="rest_framework") ), url(r"^api/", include((router.urls, 'drf'), namespace="drf")), diff --git a/src/reminders/models.py b/src/reminders/models.py index c01b5193e..b34c455aa 100644 --- a/src/reminders/models.py +++ b/src/reminders/models.py @@ -3,6 +3,8 @@ from django.db import models class Reminder(models.Model): - document = models.ForeignKey("documents.Document",on_delete=models.DO_NOTHING) + document = models.ForeignKey( + "documents.Document", on_delete=models.DO_NOTHING + ) date = models.DateTimeField() note = models.TextField(blank=True)