From 0944e0c922f45c05465a4f52cda5e2c6c05db8e4 Mon Sep 17 00:00:00 2001 From: Anton Yablokov Date: Fri, 17 Nov 2023 22:53:40 +0300 Subject: [PATCH] Create channels.py Create the `nidaqmx/channels.py` file to import the channel types gracefully. The file improves typing annotations. Without the file, there are warnings about accessing `_task_modules`, which is a private module, when getting the `Channel` class or its subclasses. --- src/handwritten/channels.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/handwritten/channels.py diff --git a/src/handwritten/channels.py b/src/handwritten/channels.py new file mode 100644 index 000000000..1a80c6f54 --- /dev/null +++ b/src/handwritten/channels.py @@ -0,0 +1,9 @@ +from nidaqmx._task_modules.channels.channel import Channel +from nidaqmx._task_modules.channels.ai_channel import AIChannel +from nidaqmx._task_modules.channels.ao_channel import AOChannel +from nidaqmx._task_modules.channels.ci_channel import CIChannel +from nidaqmx._task_modules.channels.co_channel import COChannel +from nidaqmx._task_modules.channels.di_channel import DIChannel +from nidaqmx._task_modules.channels.do_channel import DOChannel + +__all__ = ['Channel', 'AIChannel', 'AOChannel', 'CIChannel', 'COChannel', 'DIChannel', 'DOChannel']