Return name of the parent object if any. A parent object is identified by the first occurring dot.
(self)
| 374 | return None |
| 375 | |
| 376 | def get_parent_name(self): |
| 377 | """Return name of the parent object if any. |
| 378 | |
| 379 | A parent object is identified by the first occurring dot. |
| 380 | """ |
| 381 | dot_idx, _ = self.token_next_by(m=(T.Punctuation, '.')) |
| 382 | _, prev_ = self.token_prev(dot_idx) |
| 383 | return remove_quotes(prev_.value) if prev_ is not None else None |
| 384 | |
| 385 | def _get_first_name(self, idx=None, reverse=False, keywords=False, |
| 386 | real_name=False): |