all: sort imports and cleanup

This commit is contained in:
Jens Langhammer 2020-02-20 17:23:05 +01:00
parent 14e0a17dbc
commit 0b5caa85f5
8 changed files with 9 additions and 8 deletions

View File

@ -21,9 +21,9 @@ from jinja2.nativetypes import NativeEnvironment
from model_utils.managers import InheritanceManager from model_utils.managers import InheritanceManager
from structlog import get_logger from structlog import get_logger
from passbook.core.types import UIUserSettings, UILoginButton
from passbook.core.exceptions import PropertyMappingExpressionException from passbook.core.exceptions import PropertyMappingExpressionException
from passbook.core.signals import password_changed from passbook.core.signals import password_changed
from passbook.core.types import UILoginButton, UIUserSettings
from passbook.lib.models import CreatedUpdatedModel, UUIDModel from passbook.lib.models import CreatedUpdatedModel, UUIDModel
from passbook.policies.exceptions import PolicyException from passbook.policies.exceptions import PolicyException
from passbook.policies.types import PolicyRequest, PolicyResult from passbook.policies.types import PolicyRequest, PolicyResult

View File

@ -1,11 +1,11 @@
"""passbook user settings template tags""" """passbook user settings template tags"""
from typing import List, Iterable from typing import Iterable, List
from django import template from django import template
from django.template.context import RequestContext from django.template.context import RequestContext
from passbook.core.types import UIUserSettings
from passbook.core.models import Factor, Source from passbook.core.models import Factor, Source
from passbook.core.types import UIUserSettings
from passbook.policies.engine import PolicyEngine from passbook.policies.engine import PolicyEngine
register = template.Library() register = template.Library()

View File

@ -1,6 +1,6 @@
"""passbook core dataclasses""" """passbook core dataclasses"""
from typing import Optional
from dataclasses import dataclass from dataclasses import dataclass
from typing import Optional
@dataclass @dataclass

View File

@ -2,8 +2,8 @@
from django.db import models from django.db import models
from django.utils.translation import gettext as _ from django.utils.translation import gettext as _
from passbook.core.types import UIUserSettings
from passbook.core.models import Factor from passbook.core.models import Factor
from passbook.core.types import UIUserSettings
class OTPFactor(Factor): class OTPFactor(Factor):

View File

@ -3,8 +3,8 @@ from django.contrib.postgres.fields import ArrayField
from django.db import models from django.db import models
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from passbook.core.types import UIUserSettings
from passbook.core.models import Factor, Policy, User from passbook.core.models import Factor, Policy, User
from passbook.core.types import UIUserSettings
class PasswordFactor(Factor): class PasswordFactor(Factor):

View File

@ -3,8 +3,8 @@ from typing import Any, Dict, Optional
import ldap3 import ldap3
import ldap3.core.exceptions import ldap3.core.exceptions
from structlog import get_logger
from django.db.utils import IntegrityError from django.db.utils import IntegrityError
from structlog import get_logger
from passbook.core.exceptions import PropertyMappingExpressionException from passbook.core.exceptions import PropertyMappingExpressionException
from passbook.core.models import Group, User from passbook.core.models import Group, User

View File

@ -4,8 +4,8 @@ from django.db import models
from django.urls import reverse, reverse_lazy from django.urls import reverse, reverse_lazy
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from passbook.core.types import UILoginButton, UIUserSettings
from passbook.core.models import Source, UserSourceConnection from passbook.core.models import Source, UserSourceConnection
from passbook.core.types import UILoginButton, UIUserSettings
from passbook.sources.oauth.clients import get_client from passbook.sources.oauth.clients import get_client

View File

@ -1,4 +1,5 @@
#!/bin/bash -xe #!/bin/bash -xe
isort -rc passbook
black passbook black passbook
scripts/coverage.sh scripts/coverage.sh
pylint passbook pylint passbook