Determines whether a given attr only has its name field set. Args: attr: an AttrSpec instance. Returns: true iff the only field that is set is the name field.
(attr)
| 541 | |
| 542 | |
| 543 | def IsTrivialAttrSpec(attr): |
| 544 | """Determines whether a given attr only has its name field set. |
| 545 | |
| 546 | Args: |
| 547 | attr: an AttrSpec instance. |
| 548 | Returns: |
| 549 | true iff the only field that is set is the name field. |
| 550 | """ |
| 551 | return (attr.DESCRIPTOR.full_name == 'amp.validator.AttrSpec' and |
| 552 | attr.HasField('name') and len(attr.ListFields()) == 1) |
| 553 | |
| 554 | |
| 555 | def AssignedValueFor(descriptor, field_desc, field_val, registry, out): |
no outgoing calls
no test coverage detected