Skip to content

Commit

Permalink
style: Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonfish568 committed Jan 3, 2025
1 parent d589f0b commit b489355
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
4 changes: 1 addition & 3 deletions api/controllers/service_api/app/annotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,6 @@ def delete(self, app_model: App, end_user: EndUser, annotation_id):


api.add_resource(AnnotationReplyActionApi, "/apps/annotation-reply/<string:action>")
api.add_resource(
AnnotationReplyActionStatusApi, "/apps/annotation-reply/<string:action>/status/<uuid:job_id>"
)
api.add_resource(AnnotationReplyActionStatusApi, "/apps/annotation-reply/<string:action>/status/<uuid:job_id>")
api.add_resource(AnnotationListApi, "/apps/annotations")
api.add_resource(AnnotationUpdateDeleteApi, "/apps/annotations/<uuid:annotation_id>")
4 changes: 2 additions & 2 deletions api/controllers/service_api/dataset/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,8 @@ def patch(self, _, dataset_id):
)
# clear partial member list when permission is only_me or all_team_members
elif (
data.get("permission") == DatasetPermissionEnum.ONLY_ME
or data.get("permission") == DatasetPermissionEnum.ALL_TEAM
data.get("permission") == DatasetPermissionEnum.ONLY_ME
or data.get("permission") == DatasetPermissionEnum.ALL_TEAM
):
DatasetPermissionService.clear_partial_member_list(dataset_id_str)

Expand Down
2 changes: 1 addition & 1 deletion api/controllers/service_api/workspace/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ def get(self, _, model_type):
return jsonable_encoder({"data": models})


api.add_resource(ModelProviderAvailableModelApi, "/workspaces/current/models/model-types/<string:model_type>")
api.add_resource(ModelProviderAvailableModelApi, "/workspaces/current/models/model-types/<string:model_type>")
4 changes: 2 additions & 2 deletions api/controllers/service_api/wraps.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def validate_and_get_api_token(scope=None):
.filter(
ApiToken.token == auth_token,
ApiToken.type == scope,
)
)
.first()
)

Expand All @@ -241,7 +241,7 @@ def create_or_update_end_user_for_user_id(app_model: App, user_id: Optional[str]
EndUser.app_id == app_model.id,
EndUser.session_id == user_id,
EndUser.type == "service_api",
)
)
.first()
)

Expand Down

0 comments on commit b489355

Please sign in to comment.