Get the index of the author line, if available.
(path, lines)
| 71 | |
| 72 | |
| 73 | def get_author_idx(path, lines): |
| 74 | """Get the index of the author line, if available.""" |
| 75 | author_idx = np.where([AUTHOR_RE.match(line) is not None for line in lines])[0] |
| 76 | assert len(author_idx) <= 1, f"{len(author_idx)=} for {path=}" |
| 77 | return author_idx[0] if len(author_idx) else None |
| 78 | |
| 79 | |
| 80 | def get_license_idx(path, lines): |
no outgoing calls
no test coverage detected