MCPcopy
hub / github.com/mne-tools/mne-python / get_license_idx

Function get_license_idx

tools/dev/ensure_headers.py:80–84  ·  view source on GitHub ↗

Get the license index.

(path, lines)

Source from the content-addressed store, hash-verified

78
79
80def 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
87def _ensure_author(lines, path):

Callers 2

_ensure_authorFunction · 0.85
_ensure_licenseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected