Skip to content

Commit

Permalink
fix(ci): ruff isort
Browse files Browse the repository at this point in the history
  • Loading branch information
nannan00 committed Nov 15, 2023
1 parent 94d8cc3 commit 553f347
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 17 deletions.
6 changes: 3 additions & 3 deletions src/bk-user/bkuser/apis/web/idp/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
"""
from typing import List, Dict, Any
from typing import Any, Dict, List

from django.utils.translation import gettext_lazy as _
from drf_yasg.utils import swagger_serializer_method
from pydantic import ValidationError as PDValidationError
from rest_framework import serializers
from rest_framework.exceptions import ValidationError

from bkuser.apps.data_source.models import DataSource
from bkuser.apps.idp.constants import IdpStatus
from bkuser.apps.idp.models import Idp, IdpPlugin
from bkuser.apps.data_source.models import DataSource
from bkuser.apps.tenant.models import TenantUserCustomField, UserBuiltinField
from bkuser.idp_plugins.constants import BuiltinIdpPluginEnum
from bkuser.idp_plugins.base import get_plugin_cfg_cls
from bkuser.idp_plugins.constants import BuiltinIdpPluginEnum
from bkuser.utils.pydantic import stringify_pydantic_error


Expand Down
15 changes: 8 additions & 7 deletions src/bk-user/bkuser/apis/web/idp/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,22 @@
from rest_framework.permissions import IsAuthenticated
from rest_framework.response import Response

from bkuser.apps.idp.models import Idp, IdpPlugin
from bkuser.apps.data_source.models import DataSource
from bkuser.apis.web.mixins import CurrentUserTenantMixin
from bkuser.apps.data_source.models import DataSource
from bkuser.apps.idp.models import Idp, IdpPlugin
from bkuser.apps.permission.constants import PermAction
from bkuser.apps.permission.permissions import perm_class
from bkuser.idp_plugins.base import get_plugin_cfg_schema_map
from bkuser.common.error_codes import error_codes
from bkuser.idp_plugins.base import get_plugin_cfg_schema_map

from .serializers import (
IdpPluginOutputSLZ,
IdpSearchInputSLZ,
IdpSearchOutputSLZ,
IdpCreateInputSLZ,
IdpCreateOutputSLZ,
IdpRetrieveOutputSLZ,
IdpPartialUpdateInputSLZ,
IdpPluginOutputSLZ,
IdpRetrieveOutputSLZ,
IdpSearchInputSLZ,
IdpSearchOutputSLZ,
IdpUpdateInputSLZ,
)

Expand Down
8 changes: 4 additions & 4 deletions src/bk-user/bkuser/apps/idp/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@
from typing import List
from urllib.parse import urljoin

from django.db import models
from django.conf import settings
from django.db import models

from bkuser.common.models import AuditedModel
from bkuser.idp_plugins.base import get_plugin_type
from bkuser.idp_plugins.constants import BuiltinIdpPluginEnum, PluginTypeEnum
from bkuser.utils.uuid import generate_uuid

from .constants import IdpStatus
from .data_models import DataSourceMatchRuleList, DataSourceMatchRule
from bkuser.idp_plugins.base import get_plugin_type
from bkuser.idp_plugins.constants import PluginTypeEnum, BuiltinIdpPluginEnum
from .data_models import DataSourceMatchRule, DataSourceMatchRuleList


class IdpPlugin(models.Model):
Expand Down
4 changes: 1 addition & 3 deletions src/bk-user/bkuser/common/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ class BkLanguageEnum(str, StructuredEnum):


# 永久:2100-01-01 00:00:00 UTC
PERMANENT_TIME = datetime.datetime(
year=2100, month=1, day=1, hour=0, minute=0, second=0, tzinfo=datetime.timezone.utc
)
PERMANENT_TIME = datetime.datetime(year=2100, month=1, day=1, hour=0, minute=0, second=0, tzinfo=datetime.timezone.utc)

# 敏感信息掩码(7 位 * 是故意的,避免遇到用户输入 6/8 位 * 的情况)
SENSITIVE_MASK = "*******"

0 comments on commit 553f347

Please sign in to comment.