Skip to content
This repository was archived by the owner on Aug 25, 2026. It is now read-only.
This repository was archived by the owner on Aug 25, 2026. It is now read-only.

Multiple syntax issues with latest generator release 0.44.0 #848

Closed

Description

@parthea

There are various PRs opened by owl-bot that are failing for various syntax issues which we believe to be a result of the generator update. I'm going to use this issue to compile a list of the issues that I'm seeing.

For example,
python-area120-tables . See googleapis/python-area120-tables#36
The error is :

2021-04-27T03:52:51.581184531ZStep #5: error: cannot format /workspace/python-area120-tables/google/area120/tables_v1alpha1/types/tables.py: Cannot parse: 637:8: message=struct.Value,

There is a syntax error where there is a comma missing in the arguments for proto.MapField
See here.

class Row(proto.Message):
    r"""A single row in a table.
    Attributes:
        name (str):
            The resource name of the row. Row names have the form
            ``tables/{table}/rows/{row}``. The name is ignored when
            creating a row.
        values (Sequence[google.area120.tables_v1alpha1.types.Row.ValuesEntry]):
            The values of the row. This is a map of
            column key to value. Key is user entered
            name(default) or the internal column id based on
            the view in the request.
    """

    name = proto.Field(
        proto.STRING,
        number=1,
    )
    values = (
        proto.STRING,
        proto.MESSAGE,
        number=2 <---- comma missing here.
        message=struct.Value,
    )

The current client doesn't have a syntax error. See here.

Activity

  1. changed the title [-]Multiple issue with latest generator release 0.44.0[/-] [+]Multiple issues with latest generator release 0.44.0[/+] on Apr 27, 2021
  2. changed the title [-]Multiple issues with latest generator release 0.44.0[/-] [+]Multiple syntax issues with latest generator release 0.44.0[/+] on Apr 27, 2021
  3. parthea commented on Apr 27, 2021

    @parthea
    ContributorAuthor

    python-billing . See googleapis/python-billing#63
    The error is

    Info
    2021-04-27T03:52:07.360775961ZStep #5: error: cannot format /workspace/python-billing/google/cloud/billing_v1/services/cloud_billing/client.py: unindent does not match any outer indentation level (<tokenize>, line 1034)
    

    See
    https://github.com/googleapis/python-billing/blob/c4f9cd09da1f3043185093f8bd7d5d8e3a51e1f3/owl-bot-staging/v1/google/cloud/billing_v1/services/cloud_billing/client.py#L1034

             if isinstance(request, dict): <-- this line has a syntax error. There is an extra space in front of the if statement.
                # The request isn't a proto-plus wrapped type,
                # so it must be constructed via keyword expansion.
                request = iam_policy.GetIamPolicyRequest(**request)
            elif not request:
                # Null request, just make one.
                request = iam_policy.GetIamPolicyRequest()
                 if resource is not None:
                    request.resource = resource
    
  4. parthea commented on Apr 27, 2021

    @parthea
    ContributorAuthor

    python-bigquery-connection . See googleapis/python-bigquery-connection#63
    The error is

    2021-04-27T03:52:49.693371925ZStep #5: error: cannot format /workspace/python-bigquery-connection/google/cloud/bigquery_connection_v1/services/connection_service/client.py: unindent does not match any outer indentation level (<tokenize>, line 853)
    

    See https://github.com/googleapis/python-bigquery-connection/blob/aed7cf2d0797c86b1eec45aab638fc422d03a1dc/owl-bot-staging/v1/google/cloud/bigquery_connection_v1/services/connection_service/client.py#L853
    This looks to be the same issue as python-billing where there is an extra space in front of the if statement.

             if isinstance(request, dict):<-- this line has a syntax error. There is an extra space in front of the if statement.
                # The request isn't a proto-plus wrapped type,
                # so it must be constructed via keyword expansion.
                request = iam_policy.GetIamPolicyRequest(**request)
            elif not request:
                # Null request, just make one.
                request = iam_policy.GetIamPolicyRequest()
                 if resource is not None:
                    request.resource = resource
    
  5. added a commit that references this issue on Apr 28, 2021
    9046261
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions