okirialbert commented on code in PR #37659:
URL: https://github.com/apache/airflow/pull/37659#discussion_r1500951591
##########
airflow/providers/google/cloud/operators/compute.py:
##########
@@ -161,9 +163,10 @@ def __init__(
self._field_validator = GcpBodyFieldValidator(
GCE_INSTANCE_TEMPLATE_VALIDATION_PATCH_SPECIFICATION,
api_version=api_version
)
+ resource_id = self.resource_id # this line for
validate-operators-init pre-commit
self._field_sanitizer =
GcpBodyFieldSanitizer(GCE_INSTANCE_FIELDS_TO_SANITIZE)
super().__init__(
- resource_id=self.resource_id,
+ resource_id=resource_id,
Review Comment:
I think the `resource_id` assignment should of should account for the
conditional check with `name` earlier.
I also think that's why the author made an unconventional `self.resource_id`
assignment.
--
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]