style: run isort

This commit is contained in:
Mike 2021-10-16 10:43:20 -07:00
parent b1badf8dc5
commit 065de53ba4
9 changed files with 20 additions and 13 deletions

View file

@ -13,9 +13,10 @@ def register_eav(**kwargs):
class Author(models.Model):
pass
"""
from . import register
from django.db.models import Model
from . import register
def _model_eav_wrapper(model_class):
if not issubclass(model_class, Model):
raise ValueError('Wrapped class must subclass Model.')

View file

@ -1,7 +1,7 @@
import re
from django.db import models
from django.core.exceptions import ValidationError
from django.db import models
from django.utils.translation import gettext_lazy as _
from .forms import CSVFormField

View file

@ -4,6 +4,7 @@ from copy import deepcopy
from django import forms
from django.contrib.admin.widgets import AdminSplitDateTime
from django.core.exceptions import ValidationError
from django.forms import (
BooleanField,
CharField,
@ -13,7 +14,6 @@ from django.forms import (
IntegerField,
ModelForm,
)
from django.core.exceptions import ValidationError
from django.utils.translation import gettext_lazy as _
try:

View file

@ -1,8 +1,9 @@
# Generated by Django 2.0.4 on 2018-06-01 09:36
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
from django.db import migrations, models
import eav.fields

View file

@ -1,8 +1,9 @@
# Generated by Django 3.1.6 on 2021-04-04 22:09
from django.db import migrations
import eav.fields
import django.core.serializers.json
from django.db import migrations
import eav.fields
try:
from django.db.models import JSONField

View file

@ -1,6 +1,7 @@
# Generated by Django 3.2 on 2021-05-10 13:05
from django.db import migrations
import eav.fields

View file

@ -19,17 +19,20 @@ Q-expressions need to be rewritten for two reasons:
2. To ensure that Q-expression tree is compiled to valid SQL.
For details see: :func:`rewrite_q_expr`.
"""
from itertools import count
from functools import wraps
from itertools import count
from django.core.exceptions import FieldDoesNotExist
from django.core.exceptions import FieldError, ObjectDoesNotExist
from django.core.exceptions import (
FieldDoesNotExist,
FieldError,
ObjectDoesNotExist,
)
from django.db import models
from django.db.models import Case, IntegerField, Q, When
from django.db.models.query import QuerySet
from django.db.utils import NotSupportedError
from .models import Attribute, Value, EnumValue
from .models import Attribute, EnumValue, Value
def is_eav_and_leaf(expr, gr_name):

View file

@ -10,8 +10,8 @@ These validators are called by the
:class:`~eav.models.Attribute` model.
"""
import json
import datetime
import json
from django.core.exceptions import ValidationError
from django.db import models

View file

@ -1,6 +1,6 @@
from django.forms.widgets import Textarea
from django.core.exceptions import ValidationError
from django.core import validators
from django.core.exceptions import ValidationError
from django.forms.widgets import Textarea
EMPTY_VALUES = validators.EMPTY_VALUES + ('[]',)