SameerMesiah97 commented on code in PR #63995:
URL: https://github.com/apache/airflow/pull/63995#discussion_r2969487981


##########
airflow-core/src/airflow/api_fastapi/execution_api/routes/variables.py:
##########
@@ -96,12 +97,11 @@ def put_variable(
 ):
     """Set an Airflow Variable."""
     Variable.set(key=variable_key, value=body.value, 
description=body.description, team_name=team_name)
-    return {"message": "Variable successfully set"}
+    return MessageResponse(message="Variable successfully set")
 
 
 @router.delete(
     "/{variable_key:path}",

Review Comment:
   I would explicitly set the status code here like this:
   
   `status_code=status.HTTP_200_OK`



##########
airflow-core/src/airflow/api_fastapi/execution_api/routes/variables.py:
##########
@@ -96,12 +97,11 @@ def put_variable(
 ):

Review Comment:
   You might need to specify a return type here like this to satisfy MyPy:
   
   `-> MessageResponse`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to