From f79abb05cd2b4c39c8da653ccc6044924d560a82 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Thu, 3 Feb 2022 10:50:36 +0100 Subject: [PATCH] isort --- ereuse_devicehub/inventory/forms.py | 35 +++++++++++++++++------------ ereuse_devicehub/inventory/views.py | 18 +++++++++------ 2 files changed, 32 insertions(+), 21 deletions(-) diff --git a/ereuse_devicehub/inventory/forms.py b/ereuse_devicehub/inventory/forms.py index 83efbd89..89c8c835 100644 --- a/ereuse_devicehub/inventory/forms.py +++ b/ereuse_devicehub/inventory/forms.py @@ -1,24 +1,31 @@ import json -from flask_wtf import FlaskForm -from wtforms import StringField, validators, MultipleFileField, FloatField, IntegerField, \ - HiddenField, DateField, TextAreaField, SelectField -from flask import g, request -from sqlalchemy.util import OrderedSet from json.decoder import JSONDecodeError +from flask import g, request +from flask_wtf import FlaskForm +from sqlalchemy.util import OrderedSet +from wtforms import (DateField, FloatField, HiddenField, IntegerField, + MultipleFileField, SelectField, StringField, + TextAreaField, validators) + from ereuse_devicehub.db import db -from ereuse_devicehub.resources.device.models import Device, Computer, Smartphone, Cellphone, \ - Tablet, Monitor, Mouse, Keyboard, \ - MemoryCardReader, SAI -from ereuse_devicehub.resources.action.models import Action, RateComputer, Snapshot, VisualTest -from ereuse_devicehub.resources.action.schemas import Snapshot as SnapshotSchema +from ereuse_devicehub.resources.action.models import (Action, RateComputer, + Snapshot, VisualTest) +from ereuse_devicehub.resources.action.rate.v1_0 import CannotRate +from ereuse_devicehub.resources.action.schemas import \ + Snapshot as SnapshotSchema +from ereuse_devicehub.resources.action.views.snapshot import (move_json, + save_json) +from ereuse_devicehub.resources.device.models import (SAI, Cellphone, Computer, + Device, Keyboard, + MemoryCardReader, + Monitor, Mouse, + Smartphone, Tablet) +from ereuse_devicehub.resources.device.sync import Sync +from ereuse_devicehub.resources.enums import Severity, SnapshotSoftware from ereuse_devicehub.resources.lot.models import Lot from ereuse_devicehub.resources.tag.model import Tag -from ereuse_devicehub.resources.enums import SnapshotSoftware, Severity from ereuse_devicehub.resources.user.exceptions import InsufficientPermission -from ereuse_devicehub.resources.action.rate.v1_0 import CannotRate -from ereuse_devicehub.resources.device.sync import Sync -from ereuse_devicehub.resources.action.views.snapshot import save_json, move_json class LotDeviceForm(FlaskForm): diff --git a/ereuse_devicehub/inventory/views.py b/ereuse_devicehub/inventory/views.py index 29dcc78f..70dd5e53 100644 --- a/ereuse_devicehub/inventory/views.py +++ b/ereuse_devicehub/inventory/views.py @@ -1,14 +1,18 @@ -import flask import datetime -from flask.views import View -from flask import Blueprint, url_for, request -from flask_login import login_required, current_user +import flask +from flask import Blueprint, request, url_for +from flask.views import View +from flask_login import current_user, login_required + +from ereuse_devicehub.inventory.forms import (AllocateForm, LotDeviceForm, + LotForm, NewActionForm, + NewDeviceForm, TagDeviceForm, + TagForm, TagUnnamedForm, + UploadSnapshotForm) +from ereuse_devicehub.resources.device.models import Device from ereuse_devicehub.resources.lot.models import Lot from ereuse_devicehub.resources.tag.model import Tag -from ereuse_devicehub.resources.device.models import Device -from ereuse_devicehub.inventory.forms import LotDeviceForm, LotForm, UploadSnapshotForm, \ - NewDeviceForm, TagForm, TagUnnamedForm, TagDeviceForm, NewActionForm, AllocateForm # TODO(@slamora): rename base 'inventory.devices' --> 'inventory' devices = Blueprint('inventory.devices', __name__, url_prefix='/inventory')