Adding ArrayLike from numpy as a type hint leads to doc build errors.
Description of the problem
I'm trying to improve type hints in the /home/himan/projects/mne-python-issue13597/mne/preprocessing/ica.py file with something like this(one of the functions in that file):
def get_explained_variance_ratio(
self,
inst: BaseRaw | BaseEpochs | Evoked,
*,
components: ArrayLike | int | None = None,
ch_type: Literal["mag", "grad", "planar1", "planar2", "eeg"]
| ArrayLike
| None = None,
):
however the ArrayLike - sphinx is unable to resolve this ref properly. And give the following error:
<unknown>:1: WARNING: py:class reference target not found:
numpy._typing.ArrayLike [ref.class]
Link to data
No response
Expected results
Should build docs without the error described above and add proper ref to the ArrayLike.
Actual results
Throws an error and fails to resolve link.
Additional information
Hi @1himan , Are you currently working on this issue? If not, I'd love to take it up. Please let me know, and I'll wait for your reply before proceeding. Thank you
there's no "takin up" on issues @Famous077. Can we first discuss, how do we plan to solve this? Any possible approaches and discussions.
And yes, I'm working on it right now, I'll push the discussed changes in #13671