You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "eumiro (via GitHub)" <gi...@apache.org> on 2023/08/06 18:30:42 UTC
[GitHub] [airflow] eumiro opened a new pull request, #33158: Refactor: Remove redundant dict.keys() call in airflow/api_connexion/endpoints/pool_endpoint.py
eumiro opened a new pull request, #33158:
URL: https://github.com/apache/airflow/pull/33158
(no comment)
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] uranusjr commented on a diff in pull request #33158: Refactor: Remove redundant dict.keys() call in airflow/api_connexion/endpoints/pool_endpoint.py
Posted by "uranusjr (via GitHub)" <gi...@apache.org>.
uranusjr commented on code in PR #33158:
URL: https://github.com/apache/airflow/pull/33158#discussion_r1285418069
##########
airflow/api_connexion/endpoints/pool_endpoint.py:
##########
@@ -124,7 +124,7 @@ def patch_pool(
else:
required_fields = {"name", "slots"}
- fields_diff = required_fields - set(get_json_request_dict().keys())
+ fields_diff = required_fields - set(get_json_request_dict())
Review Comment:
```suggestion
fields_diff = required_fields.difference(get_json_request_dict())
```
##########
airflow/api_connexion/endpoints/pool_endpoint.py:
##########
@@ -139,7 +139,7 @@ def patch_pool(
def post_pool(*, session: Session = NEW_SESSION) -> APIResponse:
"""Create a pool."""
required_fields = {"name", "slots"} # Pool would require both fields in the post request
- fields_diff = required_fields - set(get_json_request_dict().keys())
+ fields_diff = required_fields - set(get_json_request_dict())
Review Comment:
```suggestion
fields_diff = required_fields.difference(get_json_request_dict())
```
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk merged pull request #33158: Refactor: Remove redundant dict.keys() call in airflow/api_connexion/endpoints/pool_endpoint.py
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk merged PR #33158:
URL: https://github.com/apache/airflow/pull/33158
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org