Draw Python tuple from list of attributes. If attrs is ``['x', 'y']`` and ``obj_name`` is 'self', returns ``(self.x,self.y)``.
(obj_name: str, attrs: List[str])
| 232 | |
| 233 | |
| 234 | def obj_attrs_tuple(obj_name: str, attrs: List[str]) -> str: |
| 235 | """Draw Python tuple from list of attributes. |
| 236 | |
| 237 | If attrs is ``['x', 'y']`` and ``obj_name`` is 'self', |
| 238 | returns ``(self.x,self.y)``. |
| 239 | """ |
| 240 | if not attrs: |
| 241 | return "()" |
| 242 | return f'({",".join([f"{obj_name}.{f}" for f in attrs])},)' |
| 243 | |
| 244 | |
| 245 | def reprkwargs( |
no test coverage detected