Get the Variables attribute by name. Args: name(str): the attribute name. Returns: Variables: the Variables attribute.
(self, name)
| 4005 | return self.block._var_recursive(attr_var_name) |
| 4006 | |
| 4007 | def _vars_attr(self, name): |
| 4008 | """ |
| 4009 | Get the Variables attribute by name. |
| 4010 | |
| 4011 | Args: |
| 4012 | name(str): the attribute name. |
| 4013 | |
| 4014 | Returns: |
| 4015 | Variables: the Variables attribute. |
| 4016 | """ |
| 4017 | attr_type = self.desc.attr_type(name, True) |
| 4018 | assert attr_type == core.AttrType.VARS, ( |
| 4019 | f"Required type attr({name}) is list[Variable], but received {attr_type}" |
| 4020 | ) |
| 4021 | attr_vars = [ |
| 4022 | self.block._var_recursive(var.name()) |
| 4023 | for var in self.desc.attr(name, True) |
| 4024 | ] |
| 4025 | return attr_vars |
| 4026 | |
| 4027 | def all_attrs(self): |
| 4028 | """ |
no test coverage detected