Get the license index.
(path, lines)
| 78 | |
| 79 | |
| 80 | def get_license_idx(path, lines): |
| 81 | """Get the license index.""" |
| 82 | license_idx = np.where([line.startswith(LICENSE_STARTS) for line in lines])[0] |
| 83 | assert len(license_idx) <= 1, f"{len(license_idx)=} for {path=}" |
| 84 | return license_idx[0] if len(license_idx) else None |
| 85 | |
| 86 | |
| 87 | def _ensure_author(lines, path): |
no outgoing calls
no test coverage detected