Skip to content

Commit cfb57e4

Browse files
Update stub files (#434)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Mathieu Scheltienne <mathieu.scheltienne@gmail.com>
1 parent fbf5cd1 commit cfb57e4

5 files changed

Lines changed: 30 additions & 0 deletions

File tree

src/mne_lsl/player/_base.pyi

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ class BasePlayer(ABC, ContainsMixin, SetChannelsMixin):
5353
chunk_size: int = 10,
5454
n_repeat: int | float = ...,
5555
): ...
56+
@verbose
57+
@fill_doc
5658
def anonymize(
5759
self,
5860
daysback: int | None = None,
@@ -114,6 +116,7 @@ class BasePlayer(ABC, ContainsMixin, SetChannelsMixin):
114116
Operates in place.
115117
"""
116118

119+
@fill_doc
117120
def get_channel_units(
118121
self, picks: Incomplete | None = None, only_data_chs: bool = False
119122
) -> list[tuple[int, int]]:
@@ -143,6 +146,8 @@ class BasePlayer(ABC, ContainsMixin, SetChannelsMixin):
143146
"""
144147

145148
@abstractmethod
149+
@verbose
150+
@fill_doc
146151
def rename_channels(
147152
self,
148153
mapping: dict[str, str] | Callable,
@@ -180,6 +185,8 @@ class BasePlayer(ABC, ContainsMixin, SetChannelsMixin):
180185
"""Start streaming data."""
181186

182187
@abstractmethod
188+
@verbose
189+
@fill_doc
183190
def set_channel_types(
184191
self,
185192
mapping: dict[str, str],

src/mne_lsl/stream/base.pyi

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from abc import ABC, abstractmethod
22
from collections.abc import Callable, Generator
3+
from contextlib import contextmanager
34
from datetime import datetime
45
from typing import Any
56

@@ -141,6 +142,7 @@ class BaseStream(ABC, ContainsMixin, SetChannelsMixin):
141142
"""
142143
_buffer: Incomplete
143144

145+
@fill_doc
144146
def add_reference_channels(
145147
self,
146148
ref_channels: str | list[str] | tuple[str, ...],
@@ -177,6 +179,8 @@ class BaseStream(ABC, ContainsMixin, SetChannelsMixin):
177179
buffer <resources/implementations:StreamLSL>`.
178180
"""
179181

182+
@verbose
183+
@fill_doc
180184
def anonymize(
181185
self,
182186
daysback: int | None = None,
@@ -304,6 +308,8 @@ class BaseStream(ABC, ContainsMixin, SetChannelsMixin):
304308
pick
305309
"""
306310

311+
@verbose
312+
@fill_doc
307313
def filter(
308314
self,
309315
l_freq: float | None,
@@ -395,6 +401,7 @@ class BaseStream(ABC, ContainsMixin, SetChannelsMixin):
395401
The channel types.
396402
"""
397403

404+
@fill_doc
398405
def get_channel_units(
399406
self,
400407
picks: str | list[str] | int | list[int] | ScalarIntArray | None = None,
@@ -425,6 +432,7 @@ class BaseStream(ABC, ContainsMixin, SetChannelsMixin):
425432
for micro (corresponds to ``1e-6``).
426433
"""
427434

435+
@fill_doc
428436
def get_data(
429437
self,
430438
winsize: float | None = None,
@@ -478,6 +486,8 @@ class BaseStream(ABC, ContainsMixin, SetChannelsMixin):
478486
A copy of the channel positions, if available, otherwise ``None``.
479487
"""
480488

489+
@verbose
490+
@fill_doc
481491
def notch_filter(
482492
self,
483493
freqs: float,
@@ -546,6 +556,7 @@ class BaseStream(ABC, ContainsMixin, SetChannelsMixin):
546556
def plot(self) -> None:
547557
"""Open a real-time stream viewer. Not implemented."""
548558

559+
@fill_doc
549560
def pick(
550561
self,
551562
picks: str | list[str] | int | list[int] | ScalarIntArray | None = None,
@@ -585,6 +596,8 @@ class BaseStream(ABC, ContainsMixin, SetChannelsMixin):
585596
def record(self) -> None:
586597
"""Record the stream data to disk. Not implemented."""
587598

599+
@verbose
600+
@fill_doc
588601
def rename_channels(
589602
self,
590603
mapping: dict[str, str] | Callable,
@@ -625,6 +638,8 @@ class BaseStream(ABC, ContainsMixin, SetChannelsMixin):
625638
The stream instance modified in-place.
626639
"""
627640

641+
@verbose
642+
@fill_doc
628643
def set_channel_types(
629644
self,
630645
mapping: dict[str, str],
@@ -689,6 +704,7 @@ class BaseStream(ABC, ContainsMixin, SetChannelsMixin):
689704
_ref_channels: Incomplete
690705
_ref_from: Incomplete
691706

707+
@fill_doc
692708
def set_eeg_reference(
693709
self,
694710
ref_channels: str | list[str] | tuple[str, ...],
@@ -746,6 +762,8 @@ class BaseStream(ABC, ContainsMixin, SetChannelsMixin):
746762
anonymize
747763
"""
748764

765+
@verbose
766+
@fill_doc
749767
def set_montage(
750768
self,
751769
montage: str | DigMontage | None,
@@ -825,6 +843,7 @@ class BaseStream(ABC, ContainsMixin, SetChannelsMixin):
825843
def _check_not_epoched(self, name: str) -> None:
826844
"""Check that the stream is not being epoched."""
827845

846+
@contextmanager
828847
def _interrupt_acquisition(self) -> Generator[None]:
829848
"""Context manager interrupting the acquisition thread."""
830849
_info: Incomplete

src/mne_lsl/stream/epochs.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ class EpochsStream:
264264
"""
265265
_n_new_epochs: int
266266

267+
@fill_doc
267268
def get_data(
268269
self,
269270
n_epochs: int | None = None,

src/mne_lsl/utils/_checks.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ def check_value(
7676
When the value of the item is not one of the valid options.
7777
"""
7878

79+
@fill_doc
7980
def check_verbose(verbose: Any) -> int:
8081
"""Check that the value of verbose is valid.
8182

src/mne_lsl/utils/logs.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ from ._fixes import WrapStdOut as WrapStdOut
1111

1212
_PACKAGE: str
1313

14+
@fill_doc
1415
def _init_logger(*, verbose: bool | str | int | None = ...) -> Logger:
1516
"""Initialize a logger.
1617
@@ -55,6 +56,7 @@ def add_file_handler(
5556
``"INFO"`` for True. If None is provided, the verbosity of the logger is used.
5657
"""
5758

59+
@fill_doc
5860
def set_log_level(verbose: bool | str | int | None) -> None:
5961
"""Set the log level for the logger.
6062

0 commit comments

Comments
 (0)