From 16f8e2ae282824f1be70c7c541e8aa7cea2fdc90 Mon Sep 17 00:00:00 2001
From: Paul Marillonnet <pmarillonnet@entrouvert.com>
Date: Thu, 15 Jul 2021 12:13:42 +0200
Subject: [PATCH 2/4] misc: apply isort (#54260)

---
 django_journal/actions.py                 | 4 +---
 django_journal/admin.py                   | 6 +++---
 django_journal/decorator.py               | 3 ++-
 django_journal/journal.py                 | 2 +-
 django_journal/managers.py                | 2 +-
 django_journal/middleware.py              | 1 +
 django_journal/migrations/0001_initial.py | 2 +-
 django_journal/models.py                  | 2 +-
 setup.py                                  | 6 +++---
 tests/test_main.py                        | 7 +++----
 10 files changed, 17 insertions(+), 18 deletions(-)

diff --git a/django_journal/actions.py b/django_journal/actions.py
index 93016a6..70002d6 100644
--- a/django_journal/actions.py
+++ b/django_journal/actions.py
@@ -1,10 +1,8 @@
 import csv
 
-
-from django.utils.translation import ugettext_lazy as _
 from django.http import HttpResponse
 from django.utils.encoding import force_text
-
+from django.utils.translation import ugettext_lazy as _
 
 from . import models
 
diff --git a/django_journal/admin.py b/django_journal/admin.py
index 28b0d57..1873d4a 100644
--- a/django_journal/admin.py
+++ b/django_journal/admin.py
@@ -2,14 +2,14 @@ from string import Formatter
 
 import django.contrib.admin as admin
 from django.contrib.contenttypes.models import ContentType
-from django.utils.html import format_html, escape, mark_safe
 from django.db import models
+from django.urls import NoReverseMatch, reverse
 from django.utils.encoding import force_text
+from django.utils.html import escape, format_html, mark_safe
 from django.utils.translation import ugettext_lazy as _
-from django.urls import reverse, NoReverseMatch
 
-from .models import Journal, Tag, ObjectData, StringData
 from .actions import export_as_csv
+from .models import Journal, ObjectData, StringData, Tag
 
 
 class ModelAdminFormatter(Formatter):
diff --git a/django_journal/decorator.py b/django_journal/decorator.py
index d108693..6529cfe 100644
--- a/django_journal/decorator.py
+++ b/django_journal/decorator.py
@@ -1,5 +1,6 @@
 from functools import wraps
-from django.db import transaction, DEFAULT_DB_ALIAS
+
+from django.db import DEFAULT_DB_ALIAS, transaction
 
 if hasattr(transaction, 'atomic'):
     atomic = transaction.atomic
diff --git a/django_journal/journal.py b/django_journal/journal.py
index cc05c1b..a05c127 100644
--- a/django_journal/journal.py
+++ b/django_journal/journal.py
@@ -1,8 +1,8 @@
 import logging
 
+import django.db.models
 from django.conf import settings
 from django.contrib.contenttypes.models import ContentType
-import django.db.models
 from django.utils.encoding import force_text
 
 from .decorator import atomic
diff --git a/django_journal/managers.py b/django_journal/managers.py
index 9f97c2e..5b2497a 100644
--- a/django_journal/managers.py
+++ b/django_journal/managers.py
@@ -1,6 +1,6 @@
 from django.contrib.contenttypes.models import ContentType
+from django.db.models import Manager, Q
 from django.db.models.query import QuerySet
-from django.db.models import Q, Manager
 
 
 class CachedQuerySet(QuerySet):
diff --git a/django_journal/middleware.py b/django_journal/middleware.py
index 34431a9..096b1f1 100644
--- a/django_journal/middleware.py
+++ b/django_journal/middleware.py
@@ -1,4 +1,5 @@
 from django.utils.deprecation import MiddlewareMixin
+
 from django_journal import journal
 
 
diff --git a/django_journal/migrations/0001_initial.py b/django_journal/migrations/0001_initial.py
index cacfa01..3f45137 100644
--- a/django_journal/migrations/0001_initial.py
+++ b/django_journal/migrations/0001_initial.py
@@ -1,8 +1,8 @@
 # -*- coding: utf-8 -*-
 from __future__ import unicode_literals
 
-from django.db import migrations, models
 import django.db.models.deletion
+from django.db import migrations, models
 
 
 class Migration(migrations.Migration):
diff --git a/django_journal/models.py b/django_journal/models.py
index bd33f27..2cf1682 100644
--- a/django_journal/models.py
+++ b/django_journal/models.py
@@ -1,7 +1,7 @@
 import string
 
-from django.db import models
 from django.contrib.contenttypes.fields import GenericForeignKey
+from django.db import models
 from django.utils.encoding import python_2_unicode_compatible
 from django.utils.translation import ugettext_lazy as _
 
diff --git a/setup.py b/setup.py
index d903f29..0483281 100755
--- a/setup.py
+++ b/setup.py
@@ -2,12 +2,12 @@
 import os
 import subprocess
 import sys
+from distutils.cmd import Command
+from distutils.command.build import build as _build
 
-from setuptools import setup, find_packages
+from setuptools import find_packages, setup
 from setuptools.command.install_lib import install_lib as _install_lib
-from distutils.command.build import build as _build
 from setuptools.command.sdist import sdist
-from distutils.cmd import Command
 
 
 class test(Command):
diff --git a/tests/test_main.py b/tests/test_main.py
index 85d9c67..cac9458 100644
--- a/tests/test_main.py
+++ b/tests/test_main.py
@@ -1,11 +1,10 @@
-from django.test import TestCase
-from django.contrib.auth.models import User, Group
+from django.contrib.auth.models import Group, User
 from django.db import transaction
+from django.test import TestCase
 from django.utils.encoding import force_text
 
-
-from django_journal.journal import record, error_record
 from django_journal.actions import export_as_csv_generator
+from django_journal.journal import error_record, record
 from django_journal.models import Journal, Tag
 
 
-- 
2.32.0

