Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
  • Loading branch information
yihong0618 committed Dec 30, 2024
1 parent 32c02fd commit 4b43599
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
3 changes: 2 additions & 1 deletion api/core/moderation/api/api.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from typing import Optional, MutableMapping
from collections.abc import MutableMapping
from typing import Optional

from pydantic import BaseModel

Expand Down
3 changes: 2 additions & 1 deletion api/core/moderation/base.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from abc import ABC, abstractmethod
from collections.abc import MutableMapping
from enum import Enum
from typing import Optional, MutableMapping
from typing import Optional

from pydantic import BaseModel

Expand Down
3 changes: 2 additions & 1 deletion api/core/moderation/factory.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from typing import MutableMapping
from collections.abc import MutableMapping

from core.extension.extensible import ExtensionModule
from core.moderation.base import Moderation, ModerationInputsResult, ModerationOutputsResult
from extensions.ext_code_based_extension import code_based_extension
Expand Down
2 changes: 1 addition & 1 deletion api/core/moderation/input_moderation.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import logging
from collections.abc import Mapping, MutableMapping
from collections.abc import MutableMapping
from typing import Any, Optional

from core.app.app_config.entities import AppConfig
Expand Down
4 changes: 2 additions & 2 deletions api/core/moderation/keywords/keywords.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from collections.abc import Sequence
from typing import Any, MutableMapping
from collections.abc import MutableMapping, Sequence
from typing import Any

from core.moderation.base import Moderation, ModerationAction, ModerationInputsResult, ModerationOutputsResult

Expand Down
3 changes: 2 additions & 1 deletion api/core/moderation/openai_moderation/openai_moderation.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from typing import MutableMapping
from collections.abc import MutableMapping

from core.model_manager import ModelManager
from core.model_runtime.entities.model_entities import ModelType
from core.moderation.base import Moderation, ModerationAction, ModerationInputsResult, ModerationOutputsResult
Expand Down

0 comments on commit 4b43599

Please sign in to comment.