Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 23, 2025
1 parent 6a65040 commit 2ebf29c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
4 changes: 1 addition & 3 deletions backend/adapter_processor_v2/adapter_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,7 @@ def test_adapter(adapter_id: str, adapter_metadata: dict[str, Any]) -> bool:
if adapter_metadata.pop(AdapterKeys.ADAPTER_TYPE) == AdapterKeys.X2TEXT:

if (
adapter_metadata.get(
AdapterKeys.PLATFORM_PROVIDED_UNSTRACT_KEY
)
adapter_metadata.get(AdapterKeys.PLATFORM_PROVIDED_UNSTRACT_KEY)
and add_unstract_key
):
adapter_metadata = add_unstract_key(adapter_metadata)
Expand Down
9 changes: 2 additions & 7 deletions backend/adapter_processor_v2/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,14 +179,9 @@ def create(self, request: Any) -> Response:

serializer.is_valid(raise_exception=True)
try:
adapter_type = serializer.validated_data.get(
AdapterKeys.ADAPTER_TYPE
)
adapter_type = serializer.validated_data.get(AdapterKeys.ADAPTER_TYPE)

if (
adapter_type == AdapterKeys.X2TEXT
and use_platform_unstract_key
):
if adapter_type == AdapterKeys.X2TEXT and use_platform_unstract_key:
adapter_metadata_b = serializer.validated_data.get(
AdapterKeys.ADAPTER_METADATA_B
)
Expand Down

0 comments on commit 2ebf29c

Please sign in to comment.