Skip to content

Commit f8b6958

Browse files
mikeprosserniMike Prosser
andauthored
Fix timeout type in read_waveform() methods (#880)
* fix preexisting mypy errors * better mypy fix * fix timeout type --------- Co-authored-by: Mike Prosser <[email protected]>
1 parent f7697cc commit f8b6958

File tree

8 files changed

+8
-6
lines changed

8 files changed

+8
-6
lines changed

generated/nidaqmx/stream_readers/_analog_multi_channel_reader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def read_waveforms(
143143
waveforms: list[AnalogWaveform[numpy.float64]],
144144
number_of_samples_per_channel: int = READ_ALL_AVAILABLE,
145145
reallocation_policy: ReallocationPolicy = ReallocationPolicy.TO_GROW,
146-
timeout: int = 10,
146+
timeout: float = 10.0,
147147
) -> int:
148148
"""Reads one or more floating-point samples from one or more analog input channels into a list of waveforms.
149149

generated/nidaqmx/stream_readers/_analog_single_channel_reader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def read_waveform(
115115
waveform: AnalogWaveform[numpy.float64],
116116
number_of_samples_per_channel: int = READ_ALL_AVAILABLE,
117117
reallocation_policy: ReallocationPolicy = ReallocationPolicy.TO_GROW,
118-
timeout: int = 10,
118+
timeout: float = 10.0,
119119
) -> int:
120120
"""Reads one or more floating-point samples from a single analog input channel into a waveform.
121121

generated/nidaqmx/stream_readers/_digital_multi_channel_reader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ def read_waveforms(
492492
waveforms: list[DigitalWaveform[Any]],
493493
number_of_samples_per_channel: int = READ_ALL_AVAILABLE,
494494
reallocation_policy: ReallocationPolicy = ReallocationPolicy.TO_GROW,
495-
timeout: int = 10,
495+
timeout: float = 10.0,
496496
) -> list[DigitalWaveform[Any]]:
497497
"""Reads one or more samples from one or more digital input channels into a list of waveforms.
498498

generated/nidaqmx/system/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""NI-DAQmx system classes."""
22

3+
from nidaqmx.system import storage
34
from nidaqmx.system.device import Device
45
from nidaqmx.system.physical_channel import PhysicalChannel
56
from nidaqmx.system.system import (

src/handwritten/stream_readers/_analog_multi_channel_reader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def read_waveforms(
143143
waveforms: list[AnalogWaveform[numpy.float64]],
144144
number_of_samples_per_channel: int = READ_ALL_AVAILABLE,
145145
reallocation_policy: ReallocationPolicy = ReallocationPolicy.TO_GROW,
146-
timeout: int = 10,
146+
timeout: float = 10.0,
147147
) -> int:
148148
"""Reads one or more floating-point samples from one or more analog input channels into a list of waveforms.
149149

src/handwritten/stream_readers/_analog_single_channel_reader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def read_waveform(
115115
waveform: AnalogWaveform[numpy.float64],
116116
number_of_samples_per_channel: int = READ_ALL_AVAILABLE,
117117
reallocation_policy: ReallocationPolicy = ReallocationPolicy.TO_GROW,
118-
timeout: int = 10,
118+
timeout: float = 10.0,
119119
) -> int:
120120
"""Reads one or more floating-point samples from a single analog input channel into a waveform.
121121

src/handwritten/stream_readers/_digital_multi_channel_reader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ def read_waveforms(
492492
waveforms: list[DigitalWaveform[Any]],
493493
number_of_samples_per_channel: int = READ_ALL_AVAILABLE,
494494
reallocation_policy: ReallocationPolicy = ReallocationPolicy.TO_GROW,
495-
timeout: int = 10,
495+
timeout: float = 10.0,
496496
) -> list[DigitalWaveform[Any]]:
497497
"""Reads one or more samples from one or more digital input channels into a list of waveforms.
498498

src/handwritten/system/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""NI-DAQmx system classes."""
22

3+
from nidaqmx.system import storage
34
from nidaqmx.system.device import Device
45
from nidaqmx.system.physical_channel import PhysicalChannel
56
from nidaqmx.system.system import (

0 commit comments

Comments
 (0)