Skip to content

Commit 2bc863a

Browse files
Fix documentation of player LSL first argument (#391)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
1 parent 174ef0f commit 2bc863a

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

src/mne_lsl/player/_base.pyi

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class BasePlayer(ABC, ContainsMixin, SetChannelsMixin):
2626
----------
2727
fname : path-like | Raw
2828
Path to the file to re-play as a mock real-time stream. MNE-Python must be able
29-
to load the file with :func:`mne.io.read_raw`. An :class:`~mne.io.Raw` object
29+
to load the file with :func:`mne.io.read_raw`. A :class:`~mne.io.Raw` object
3030
can be provided directly.
3131
chunk_size : int ``≥ 1``
3232
Number of samples pushed at once on the mock real-time stream.

src/mne_lsl/player/player_lsl.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
from collections.abc import Callable
1919
from pathlib import Path
2020

21+
from mne.io import BaseRaw
22+
2123

2224
@fill_doc
2325
class PlayerLSL(BasePlayer):
@@ -92,7 +94,7 @@ class PlayerLSL(BasePlayer):
9294

9395
def __init__(
9496
self,
95-
fname: str | Path,
97+
fname: str | Path | BaseRaw,
9698
chunk_size: int = 10,
9799
n_repeat: int | float = np.inf,
98100
*,

src/mne_lsl/player/player_lsl.pyi

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ from pathlib import Path
33

44
from _typeshed import Incomplete
55
from mne import Annotations
6+
from mne.io import BaseRaw
67

78
from ..lsl import StreamInfo as StreamInfo
89
from ..lsl import StreamOutlet as StreamOutlet
@@ -22,7 +23,7 @@ class PlayerLSL(BasePlayer):
2223
----------
2324
fname : path-like | Raw
2425
Path to the file to re-play as a mock real-time stream. MNE-Python must be able
25-
to load the file with :func:`mne.io.read_raw`. An :class:`~mne.io.Raw` object
26+
to load the file with :func:`mne.io.read_raw`. A :class:`~mne.io.Raw` object
2627
can be provided directly.
2728
chunk_size : int ``≥ 1``
2829
Number of samples pushed at once on the :class:`~mne_lsl.lsl.StreamOutlet`.
@@ -100,7 +101,7 @@ class PlayerLSL(BasePlayer):
100101

101102
def __init__(
102103
self,
103-
fname: str | Path,
104+
fname: str | Path | BaseRaw,
104105
chunk_size: int = 10,
105106
n_repeat: int | float = ...,
106107
*,

src/mne_lsl/utils/_docs.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
docdict["player_fname"] = """
8989
fname : path-like | Raw
9090
Path to the file to re-play as a mock real-time stream. MNE-Python must be able
91-
to load the file with :func:`mne.io.read_raw`. An :class:`~mne.io.Raw` object
91+
to load the file with :func:`mne.io.read_raw`. A :class:`~mne.io.Raw` object
9292
can be provided directly."""
9393

9494
# -- Q ---------------------------------------------------------------------------------

0 commit comments

Comments
 (0)