diff --git a/.github/workflows/update-python-and-pre-commit-dependencies.yml b/.github/workflows/update-python-and-pre-commit-dependencies.yml index 87e1225b..af3d0678 100644 --- a/.github/workflows/update-python-and-pre-commit-dependencies.yml +++ b/.github/workflows/update-python-and-pre-commit-dependencies.yml @@ -22,7 +22,7 @@ jobs: python-version: x # any version check-latest: true - name: Install workflow dependencies - run: pip install poetry yamlfix toml-sort requests pre-commit-update + run: pip install poetry yamlfix toml-sort requests pre-commit-update pre-commit - uses: crazy-max/ghaction-import-gpg@v6 with: gpg_private_key: ${{ secrets.TEK_OPENSOURCE_GPG_SIGNING_KEY_PRIVATE }} @@ -31,6 +31,10 @@ jobs: git_commit_gpgsign: true - name: Run updater script run: python scripts/update_development_dependencies.py --no-install + - name: Run pre-commit + env: + SKIP: pylint,pyright,pyright-verifytypes,pyroma + run: python -m pre_commit run --all - uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: 'ci: Update python linters and pre-commit dependencies.' diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index abc710c0..7ccdb1d9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -125,7 +125,7 @@ repos: always_run: true args: [., --min=10] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.2.2 + rev: v0.3.0 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] diff --git a/docs/conf.py b/docs/conf.py index 3a1a96e9..e92eeb71 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -4,6 +4,7 @@ This file only contains a selection of the most common options. For a full list see the documentation: https://www.sphinx-doc.org/en/master/usage/configuration.html """ + import os import shutil diff --git a/examples/miscellaneous/adding_devices.py b/examples/miscellaneous/adding_devices.py index 29f0108f..0d4b3001 100644 --- a/examples/miscellaneous/adding_devices.py +++ b/examples/miscellaneous/adding_devices.py @@ -1,4 +1,5 @@ """An example of adding devices via Python code.""" + from tm_devices import DeviceManager from tm_devices.helpers import ( DMConfigOptions, diff --git a/examples/miscellaneous/adding_devices_with_env_var.py b/examples/miscellaneous/adding_devices_with_env_var.py index f8472240..791ce215 100644 --- a/examples/miscellaneous/adding_devices_with_env_var.py +++ b/examples/miscellaneous/adding_devices_with_env_var.py @@ -3,6 +3,7 @@ These environment variables are settable outside Python code, usually they are set in the shell used to execute the Python script. """ + import os from tm_devices import DeviceManager diff --git a/examples/miscellaneous/alias_usage.py b/examples/miscellaneous/alias_usage.py index 28fc52cd..379adcf1 100644 --- a/examples/miscellaneous/alias_usage.py +++ b/examples/miscellaneous/alias_usage.py @@ -1,4 +1,5 @@ """An example of alias usage.""" + from tm_devices import DeviceManager with DeviceManager(verbose=True) as dm: diff --git a/examples/miscellaneous/custom_device_driver_support.py b/examples/miscellaneous/custom_device_driver_support.py index 77c761fe..728cea30 100644 --- a/examples/miscellaneous/custom_device_driver_support.py +++ b/examples/miscellaneous/custom_device_driver_support.py @@ -1,4 +1,5 @@ """An example of external device support via a custom driver.""" + from tm_devices import DeviceManager from tm_devices.drivers import MSO5 from tm_devices.drivers.pi.scopes.scope import Scope diff --git a/examples/miscellaneous/disable_command_verification.py b/examples/miscellaneous/disable_command_verification.py index 9151eae5..5856699d 100644 --- a/examples/miscellaneous/disable_command_verification.py +++ b/examples/miscellaneous/disable_command_verification.py @@ -1,4 +1,5 @@ """An example showing how to disable the verification portion of the ``.set_and_check()`` method.""" + from tm_devices import DeviceManager from tm_devices.drivers import MSO5, SMU2601B diff --git a/examples/miscellaneous/pyvisa_resource_access.py b/examples/miscellaneous/pyvisa_resource_access.py index 6f688cf5..c1aca7f6 100644 --- a/examples/miscellaneous/pyvisa_resource_access.py +++ b/examples/miscellaneous/pyvisa_resource_access.py @@ -1,4 +1,5 @@ """Directly access the PyVISA resource object.""" + from tm_devices import DeviceManager with DeviceManager() as device_manager: diff --git a/examples/miscellaneous/register_dm_atexit.py b/examples/miscellaneous/register_dm_atexit.py index ec5a3cbb..098dfbbf 100644 --- a/examples/miscellaneous/register_dm_atexit.py +++ b/examples/miscellaneous/register_dm_atexit.py @@ -1,4 +1,5 @@ """An example showing how to register the DeviceManager to close on program exit.""" + import atexit from tm_devices import DeviceManager diff --git a/examples/miscellaneous/visa_connection_selectivity.py b/examples/miscellaneous/visa_connection_selectivity.py index 389c6d8e..5d4ce8a3 100644 --- a/examples/miscellaneous/visa_connection_selectivity.py +++ b/examples/miscellaneous/visa_connection_selectivity.py @@ -1,4 +1,5 @@ """An example script to choose visa from different visa resources.""" + from tm_devices import DeviceManager from tm_devices.helpers import PYVISA_PY_BACKEND, SYSTEM_DEFAULT_VISA_BACKEND diff --git a/examples/scopes/tekscope/basic_curve_query.py b/examples/scopes/tekscope/basic_curve_query.py index 465ccf41..9cd63853 100644 --- a/examples/scopes/tekscope/basic_curve_query.py +++ b/examples/scopes/tekscope/basic_curve_query.py @@ -1,4 +1,5 @@ """An example showing a basic curve query.""" + from tm_devices import DeviceManager EXAMPLE_CSV_FILE = "example_curve_query.csv" diff --git a/examples/scopes/tekscope/basic_save_recall.py b/examples/scopes/tekscope/basic_save_recall.py index d2bef45b..61a57805 100644 --- a/examples/scopes/tekscope/basic_save_recall.py +++ b/examples/scopes/tekscope/basic_save_recall.py @@ -1,4 +1,5 @@ """An example of saving and recalling a waveform and session file.""" + from tm_devices import DeviceManager from tm_devices.drivers import MSO6B diff --git a/examples/scopes/tekscope/generate_internal_afg_signal.py b/examples/scopes/tekscope/generate_internal_afg_signal.py index f9658fd1..80d9c7a7 100644 --- a/examples/scopes/tekscope/generate_internal_afg_signal.py +++ b/examples/scopes/tekscope/generate_internal_afg_signal.py @@ -1,4 +1,5 @@ """An example showing how to generate a signal using the scope's internal AFG.""" + from tm_devices import DeviceManager from tm_devices.drivers import MSO5 diff --git a/examples/scopes/tekscope/get_acquisition_data.py b/examples/scopes/tekscope/get_acquisition_data.py index 9d6d8cb5..55e99c37 100644 --- a/examples/scopes/tekscope/get_acquisition_data.py +++ b/examples/scopes/tekscope/get_acquisition_data.py @@ -1,4 +1,5 @@ """An example script for connecting and configuring scope for acquisition.""" + from tm_devices import DeviceManager from tm_devices.drivers import MSO6B from tm_devices.helpers import PYVISA_PY_BACKEND diff --git a/examples/scopes/tekscope_70k/dpojet/adding_dpojet_measurements.py b/examples/scopes/tekscope_70k/dpojet/adding_dpojet_measurements.py index 265ea7b4..a66c3637 100644 --- a/examples/scopes/tekscope_70k/dpojet/adding_dpojet_measurements.py +++ b/examples/scopes/tekscope_70k/dpojet/adding_dpojet_measurements.py @@ -1,4 +1,5 @@ """An example of adding dpojet measurements and plots.""" + from tm_devices import DeviceManager from tm_devices.drivers import MSO70KDX from tm_devices.helpers import PYVISA_PY_BACKEND diff --git a/examples/source_measure_units/2400/smu_2460_pulse_train.py b/examples/source_measure_units/2400/smu_2460_pulse_train.py index d0e75d63..e3b06c81 100644 --- a/examples/source_measure_units/2400/smu_2460_pulse_train.py +++ b/examples/source_measure_units/2400/smu_2460_pulse_train.py @@ -7,6 +7,7 @@ Converted to Python tm_devices script. DCA 4.7.23 """ + import time from tm_devices import DeviceManager diff --git a/examples/source_measure_units/2400/smu_2460_solar_panel_sweep.py b/examples/source_measure_units/2400/smu_2460_solar_panel_sweep.py index a66f9229..f4b49543 100644 --- a/examples/source_measure_units/2400/smu_2460_solar_panel_sweep.py +++ b/examples/source_measure_units/2400/smu_2460_solar_panel_sweep.py @@ -8,6 +8,7 @@ Converted to Python tm_devices script. DCA 4.7.23 """ + import time from tm_devices import DeviceManager diff --git a/examples/source_measure_units/2400/smu_2461_1kw_pulsing.py b/examples/source_measure_units/2400/smu_2461_1kw_pulsing.py index b0c672b0..84e8488e 100644 --- a/examples/source_measure_units/2400/smu_2461_1kw_pulsing.py +++ b/examples/source_measure_units/2400/smu_2461_1kw_pulsing.py @@ -2,6 +2,7 @@ This script creates pulses on the model 2461. """ + from time import sleep from tm_devices import DeviceManager diff --git a/examples/source_measure_units/2400/smu_2461_pulse_sweep_i_digitize_v.py b/examples/source_measure_units/2400/smu_2461_pulse_sweep_i_digitize_v.py index 3cdc3bad..f9526e52 100644 --- a/examples/source_measure_units/2400/smu_2461_pulse_sweep_i_digitize_v.py +++ b/examples/source_measure_units/2400/smu_2461_pulse_sweep_i_digitize_v.py @@ -9,6 +9,7 @@ (smu.source.pulsesweeplinear) is sent to the instrument. The pulse command accepts a lot of arguments so the the arguments are stored in variables to make them easier to read. """ + from typing import cast, List from tm_devices import DeviceManager diff --git a/examples/source_measure_units/2400/smu_2470_insulation_resistance.py b/examples/source_measure_units/2400/smu_2470_insulation_resistance.py index 5515f64e..4c23aae4 100644 --- a/examples/source_measure_units/2400/smu_2470_insulation_resistance.py +++ b/examples/source_measure_units/2400/smu_2470_insulation_resistance.py @@ -3,6 +3,7 @@ It does this by sourcing 300 V and measuring the resistance. The Simple Loop trigger model template is used to make 10 measurements at 100 ms intervals. """ + from typing import List from tm_devices import DeviceManager diff --git a/examples/source_measure_units/2400/smu_2470_mosfet_leakage.py b/examples/source_measure_units/2400/smu_2470_mosfet_leakage.py index a1fa500b..5dc38589 100644 --- a/examples/source_measure_units/2400/smu_2470_mosfet_leakage.py +++ b/examples/source_measure_units/2400/smu_2470_mosfet_leakage.py @@ -4,6 +4,7 @@ trigger model template applies the voltage for 60 seconds and makes measurements at 200 ms intervals. """ + from typing import List from tm_devices import DeviceManager diff --git a/examples/source_measure_units/2600/reading_dynamic_buffers.py b/examples/source_measure_units/2600/reading_dynamic_buffers.py index 6d0f35e5..288413a6 100644 --- a/examples/source_measure_units/2600/reading_dynamic_buffers.py +++ b/examples/source_measure_units/2600/reading_dynamic_buffers.py @@ -1,4 +1,5 @@ """An example of creating and reading from a dynamic buffer.""" + from tm_devices import DeviceManager from tm_devices.drivers import SMU2601B diff --git a/examples/source_measure_units/2600/smu_2600_ac_waveform_sweep.py b/examples/source_measure_units/2600/smu_2600_ac_waveform_sweep.py index 037514ed..aa6eec1d 100644 --- a/examples/source_measure_units/2600/smu_2600_ac_waveform_sweep.py +++ b/examples/source_measure_units/2600/smu_2600_ac_waveform_sweep.py @@ -12,6 +12,7 @@ Converted to Python tm_devices script. DCA 4.12.23 """ + import math from tm_devices import DeviceManager diff --git a/examples/source_measure_units/2600/smu_2600_bjt_slow.py b/examples/source_measure_units/2600/smu_2600_bjt_slow.py index 31f1533d..d1035649 100644 --- a/examples/source_measure_units/2600/smu_2600_bjt_slow.py +++ b/examples/source_measure_units/2600/smu_2600_bjt_slow.py @@ -10,6 +10,7 @@ Converted to Python tm_devices script. DCA 4.11.23 """ + import time from typing import Dict, Tuple diff --git a/examples/source_measure_units/2600/smu_2600_diode_test_fast.py b/examples/source_measure_units/2600/smu_2600_diode_test_fast.py index e199031b..0c9aa8d7 100644 --- a/examples/source_measure_units/2600/smu_2600_diode_test_fast.py +++ b/examples/source_measure_units/2600/smu_2600_diode_test_fast.py @@ -11,6 +11,7 @@ Converted to Python tm_devices script. DCA 4.12.23 """ + import time from typing import Dict, Tuple diff --git a/examples/source_measure_units/2600/smu_2651_fast_adc_usage.py b/examples/source_measure_units/2600/smu_2651_fast_adc_usage.py index ad212ede..7aeeeda9 100644 --- a/examples/source_measure_units/2600/smu_2651_fast_adc_usage.py +++ b/examples/source_measure_units/2600/smu_2651_fast_adc_usage.py @@ -11,6 +11,7 @@ Converted to Python tm_devices script. DCA 4.12.23 """ + from datetime import datetime from dateutil.tz import tzlocal diff --git a/examples/source_measure_units/2600/smu_2657_dioderl_swp.py b/examples/source_measure_units/2600/smu_2657_dioderl_swp.py index 2140d1f8..b9a4b2c1 100644 --- a/examples/source_measure_units/2600/smu_2657_dioderl_swp.py +++ b/examples/source_measure_units/2600/smu_2657_dioderl_swp.py @@ -1,4 +1,5 @@ """Linear voltage sweep to measure the reverse leakage of a diode.""" + import math from time import sleep diff --git a/examples/source_measure_units/2600/smu_2657a_capacitor_leakage.py b/examples/source_measure_units/2600/smu_2657a_capacitor_leakage.py index 218aa08c..b5290b74 100644 --- a/examples/source_measure_units/2600/smu_2657a_capacitor_leakage.py +++ b/examples/source_measure_units/2600/smu_2657a_capacitor_leakage.py @@ -16,6 +16,7 @@ Converted to Python tm_devices script. DCA 5.10.23 """ + from tm_devices import DeviceManager from tm_devices.drivers import SMU2657A diff --git a/examples/source_measure_units/2600/smu_2657a_mosfet_bvdss.py b/examples/source_measure_units/2600/smu_2657a_mosfet_bvdss.py index a0283aa5..03efb64c 100644 --- a/examples/source_measure_units/2600/smu_2657a_mosfet_bvdss.py +++ b/examples/source_measure_units/2600/smu_2657a_mosfet_bvdss.py @@ -18,6 +18,7 @@ Converted to Python tm_devices script. DCA 6.6.23 """ + from tm_devices import DeviceManager from tm_devices.drivers import SMU2636B, SMU2657A diff --git a/examples/source_measure_units/2600/smu_2657a_mosfet_idss.py b/examples/source_measure_units/2600/smu_2657a_mosfet_idss.py index 40064a7e..e9f4ae77 100644 --- a/examples/source_measure_units/2600/smu_2657a_mosfet_idss.py +++ b/examples/source_measure_units/2600/smu_2657a_mosfet_idss.py @@ -18,6 +18,7 @@ Converted to Python tm_devices script. DCA 6.6.23 """ + from tm_devices import DeviceManager from tm_devices.drivers import SMU2636B, SMU2657A diff --git a/examples/system_switch/3700/dmm_3706a_basic_scan.py b/examples/system_switch/3700/dmm_3706a_basic_scan.py index b8b56349..737d2414 100644 --- a/examples/system_switch/3700/dmm_3706a_basic_scan.py +++ b/examples/system_switch/3700/dmm_3706a_basic_scan.py @@ -54,6 +54,7 @@ Rev: 1-EEB 1.1-Update Function Names-EEB """ + from tm_devices import DeviceManager from tm_devices.drivers import SS3706A diff --git a/examples/system_switch/3700/dmm_3706a_simple_scan.py b/examples/system_switch/3700/dmm_3706a_simple_scan.py index 66f9ee24..fae37b4c 100644 --- a/examples/system_switch/3700/dmm_3706a_simple_scan.py +++ b/examples/system_switch/3700/dmm_3706a_simple_scan.py @@ -23,6 +23,7 @@ Rev: 1-EEB 1.1-Updated Function Names-EEB """ + from tm_devices import DeviceManager from tm_devices.drivers import SS3706A diff --git a/examples/system_switch/3700/dmm_3706a_temp_scan.py b/examples/system_switch/3700/dmm_3706a_temp_scan.py index f5bb0ff3..7f71a959 100644 --- a/examples/system_switch/3700/dmm_3706a_temp_scan.py +++ b/examples/system_switch/3700/dmm_3706a_temp_scan.py @@ -24,6 +24,7 @@ Rev: 1-EEB 1.1-Update Function Names-EEB """ + from tm_devices import DeviceManager from tm_devices.drivers import SS3706A diff --git a/pyproject.toml b/pyproject.toml index b95b431d..6512e8ec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -105,7 +105,7 @@ poetry = ">=1.8.0" pre-commit = ">=2.20.0" pre-commit-update = ">=0.1.3" pylint = {extras = ["spelling"], version = "3.1.0"} # Update this by running scripts/update_development_dependencies.py -pyright = "1.1.351" # Update this by running scripts/update_development_dependencies.py +pyright = "1.1.352" # Update this by running scripts/update_development_dependencies.py pyroma = ">=4.2" pytest = ">=7.1.2" pytest-cov = ">=3.0.0" @@ -113,7 +113,7 @@ pytest-html = ">=4.0" pytest-order = ">=1.0.1" pytest-profiling = ">=1.7.0" python-semantic-release = ">=8.5.1" -ruff = "0.2.2" # Update this by running scripts/update_development_dependencies.py +ruff = "0.3.0" # Update this by running scripts/update_development_dependencies.py safety = ">=2.1.1" sphinx-autoapi = ">=2.0.0" sphinx-copybutton = ">=0.5.1" diff --git a/scripts/check_unreleased_changelog_items.py b/scripts/check_unreleased_changelog_items.py index e1488af8..ab019c77 100644 --- a/scripts/check_unreleased_changelog_items.py +++ b/scripts/check_unreleased_changelog_items.py @@ -5,6 +5,7 @@ It will also copy the necessary files into the template directory to properly render the CHANGELOG and Release Notes. """ + import pathlib import re import shutil diff --git a/scripts/contributor_setup.py b/scripts/contributor_setup.py index 20c1c6f9..ddffb0b6 100644 --- a/scripts/contributor_setup.py +++ b/scripts/contributor_setup.py @@ -2,6 +2,7 @@ This script will run through the commands listed in the CONTRIBUTING.md file. """ + from __future__ import annotations import argparse diff --git a/scripts/create_post_version_for_testpypi.py b/scripts/create_post_version_for_testpypi.py index 83cc4ef5..3c3f530d 100644 --- a/scripts/create_post_version_for_testpypi.py +++ b/scripts/create_post_version_for_testpypi.py @@ -1,4 +1,5 @@ """Create a post-release version for test.pypi.org.""" + import argparse from poetry.core.constraints.version import Version diff --git a/scripts/project_version.py b/scripts/project_version.py index 865b298c..4bf7a17d 100644 --- a/scripts/project_version.py +++ b/scripts/project_version.py @@ -1,4 +1,5 @@ """This script modifies or gets the current project version in the pyproject.toml file.""" + import argparse import pathlib diff --git a/scripts/pypi_latest_version.py b/scripts/pypi_latest_version.py index 957afbe8..907743f5 100644 --- a/scripts/pypi_latest_version.py +++ b/scripts/pypi_latest_version.py @@ -1,4 +1,5 @@ """Get the latest version from the index server.""" + import argparse import json diff --git a/scripts/update_development_dependencies.py b/scripts/update_development_dependencies.py index 8c92a763..738f2547 100644 --- a/scripts/update_development_dependencies.py +++ b/scripts/update_development_dependencies.py @@ -3,6 +3,7 @@ This script will update the development dependencies that are pinned in the pyproject.toml and .pre- commit-config.yaml files. """ + import argparse import shlex import subprocess diff --git a/src/tm_devices/__init__.py b/src/tm_devices/__init__.py index 4dfca694..e3bd7556 100644 --- a/src/tm_devices/__init__.py +++ b/src/tm_devices/__init__.py @@ -10,6 +10,7 @@ True 2023-09-21 01:50:16.031 - DeviceManager Closed """ + from importlib.metadata import version from tm_devices.device_manager import DeviceManager, print_available_visa_devices diff --git a/src/tm_devices/commands/_163n04_mdo/search.py b/src/tm_devices/commands/_163n04_mdo/search.py index 1401db5f..0f8823e6 100644 --- a/src/tm_devices/commands/_163n04_mdo/search.py +++ b/src/tm_devices/commands/_163n04_mdo/search.py @@ -446,6 +446,7 @@ - SEARCH:SPECTral:LIST? - SEARCH? """ # noqa: E501 + from typing import Dict, Optional, TYPE_CHECKING from .._helpers import ( @@ -736,19 +737,19 @@ class SearchSearchItemTriggerAUpperthreshold(SCPICmdRead): def __init__(self, device: Optional["PIDevice"], cmd_syntax: str) -> None: super().__init__(device, cmd_syntax) - self._ch: Dict[ - int, SearchSearchItemTriggerAUpperthresholdChannel - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerAUpperthresholdChannel( - device, f"{self._cmd_syntax}:CH{x}" + self._ch: Dict[int, SearchSearchItemTriggerAUpperthresholdChannel] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerAUpperthresholdChannel( + device, f"{self._cmd_syntax}:CH{x}" + ) ) ) self._math = SearchSearchItemTriggerAUpperthresholdMath(device, f"{self._cmd_syntax}:MATH") - self._ref: Dict[ - int, SearchSearchItemTriggerAUpperthresholdRefItem - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerAUpperthresholdRefItem( - device, f"{self._cmd_syntax}:REF{x}" + self._ref: Dict[int, SearchSearchItemTriggerAUpperthresholdRefItem] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerAUpperthresholdRefItem( + device, f"{self._cmd_syntax}:REF{x}" + ) ) ) self._rf_amplitude = SearchSearchItemTriggerAUpperthresholdRfAmplitude( @@ -1600,11 +1601,11 @@ class SearchSearchItemTriggerASetholdThreshold(SCPICmdRead): def __init__(self, device: Optional["PIDevice"], cmd_syntax: str) -> None: super().__init__(device, cmd_syntax) - self._ref: Dict[ - int, SearchSearchItemTriggerASetholdThresholdRefItem - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerASetholdThresholdRefItem( - device, f"{self._cmd_syntax}:REF{x}" + self._ref: Dict[int, SearchSearchItemTriggerASetholdThresholdRefItem] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerASetholdThresholdRefItem( + device, f"{self._cmd_syntax}:REF{x}" + ) ) ) self._math = SearchSearchItemTriggerASetholdThresholdMath( @@ -3512,19 +3513,19 @@ class SearchSearchItemTriggerALowerthreshold(SCPICmdRead): def __init__(self, device: Optional["PIDevice"], cmd_syntax: str) -> None: super().__init__(device, cmd_syntax) - self._ch: Dict[ - int, SearchSearchItemTriggerALowerthresholdChannel - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerALowerthresholdChannel( - device, f"{self._cmd_syntax}:CH{x}" + self._ch: Dict[int, SearchSearchItemTriggerALowerthresholdChannel] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerALowerthresholdChannel( + device, f"{self._cmd_syntax}:CH{x}" + ) ) ) self._math = SearchSearchItemTriggerALowerthresholdMath(device, f"{self._cmd_syntax}:MATH") - self._ref: Dict[ - int, SearchSearchItemTriggerALowerthresholdRefItem - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerALowerthresholdRefItem( - device, f"{self._cmd_syntax}:REF{x}" + self._ref: Dict[int, SearchSearchItemTriggerALowerthresholdRefItem] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerALowerthresholdRefItem( + device, f"{self._cmd_syntax}:REF{x}" + ) ) ) self._rf_amplitude = SearchSearchItemTriggerALowerthresholdRfAmplitude( @@ -3926,19 +3927,19 @@ class SearchSearchItemTriggerALogicThreshold(SCPICmdRead): def __init__(self, device: Optional["PIDevice"], cmd_syntax: str) -> None: super().__init__(device, cmd_syntax) - self._ch: Dict[ - int, SearchSearchItemTriggerALogicThresholdChannel - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerALogicThresholdChannel( - device, f"{self._cmd_syntax}:CH{x}" + self._ch: Dict[int, SearchSearchItemTriggerALogicThresholdChannel] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerALogicThresholdChannel( + device, f"{self._cmd_syntax}:CH{x}" + ) ) ) self._math = SearchSearchItemTriggerALogicThresholdMath(device, f"{self._cmd_syntax}:MATH") - self._ref: Dict[ - int, SearchSearchItemTriggerALogicThresholdRefItem - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerALogicThresholdRefItem( - device, f"{self._cmd_syntax}:REF{x}" + self._ref: Dict[int, SearchSearchItemTriggerALogicThresholdRefItem] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerALogicThresholdRefItem( + device, f"{self._cmd_syntax}:REF{x}" + ) ) ) self._rf_amplitude = SearchSearchItemTriggerALogicThresholdRfAmplitude( @@ -4353,11 +4354,11 @@ class SearchSearchItemTriggerALogicPatternInput(SCPICmdRead): def __init__(self, device: Optional["PIDevice"], cmd_syntax: str) -> None: super().__init__(device, cmd_syntax) - self._ch: Dict[ - int, SearchSearchItemTriggerALogicPatternInputChannel - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerALogicPatternInputChannel( - device, f"{self._cmd_syntax}:CH{x}" + self._ch: Dict[int, SearchSearchItemTriggerALogicPatternInputChannel] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerALogicPatternInputChannel( + device, f"{self._cmd_syntax}:CH{x}" + ) ) ) @@ -4889,25 +4890,27 @@ class SearchSearchItemTriggerALogicInput(SCPICmdRead): def __init__(self, device: Optional["PIDevice"], cmd_syntax: str) -> None: super().__init__(device, cmd_syntax) - self._ch: Dict[ - int, SearchSearchItemTriggerALogicInputChannel - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerALogicInputChannel(device, f"{self._cmd_syntax}:CH{x}") + self._ch: Dict[int, SearchSearchItemTriggerALogicInputChannel] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerALogicInputChannel( + device, f"{self._cmd_syntax}:CH{x}" + ) + ) ) self._clock = SearchSearchItemTriggerALogicInputClock(device, f"{self._cmd_syntax}:CLOCk") - self._d: Dict[ - int, SearchSearchItemTriggerALogicInputDigitalBit - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerALogicInputDigitalBit( - device, f"{self._cmd_syntax}:D{x}" + self._d: Dict[int, SearchSearchItemTriggerALogicInputDigitalBit] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerALogicInputDigitalBit( + device, f"{self._cmd_syntax}:D{x}" + ) ) ) self._math = SearchSearchItemTriggerALogicInputMath(device, f"{self._cmd_syntax}:MATH") - self._ref: Dict[ - int, SearchSearchItemTriggerALogicInputRefItem - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerALogicInputRefItem( - device, f"{self._cmd_syntax}:REF{x}" + self._ref: Dict[int, SearchSearchItemTriggerALogicInputRefItem] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerALogicInputRefItem( + device, f"{self._cmd_syntax}:REF{x}" + ) ) ) self._rf_amplitude = SearchSearchItemTriggerALogicInputRfAmplitude( diff --git a/src/tm_devices/commands/_16x4xq_mdo/search.py b/src/tm_devices/commands/_16x4xq_mdo/search.py index f690ed15..3b0dae3e 100644 --- a/src/tm_devices/commands/_16x4xq_mdo/search.py +++ b/src/tm_devices/commands/_16x4xq_mdo/search.py @@ -408,6 +408,7 @@ - SEARCH:SPECTral:LIST? - SEARCH? """ # noqa: E501 + from typing import Dict, Optional, TYPE_CHECKING from .._helpers import ( @@ -698,19 +699,19 @@ class SearchSearchItemTriggerAUpperthreshold(SCPICmdRead): def __init__(self, device: Optional["PIDevice"], cmd_syntax: str) -> None: super().__init__(device, cmd_syntax) - self._ch: Dict[ - int, SearchSearchItemTriggerAUpperthresholdChannel - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerAUpperthresholdChannel( - device, f"{self._cmd_syntax}:CH{x}" + self._ch: Dict[int, SearchSearchItemTriggerAUpperthresholdChannel] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerAUpperthresholdChannel( + device, f"{self._cmd_syntax}:CH{x}" + ) ) ) self._math = SearchSearchItemTriggerAUpperthresholdMath(device, f"{self._cmd_syntax}:MATH") - self._ref: Dict[ - int, SearchSearchItemTriggerAUpperthresholdRefItem - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerAUpperthresholdRefItem( - device, f"{self._cmd_syntax}:REF{x}" + self._ref: Dict[int, SearchSearchItemTriggerAUpperthresholdRefItem] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerAUpperthresholdRefItem( + device, f"{self._cmd_syntax}:REF{x}" + ) ) ) self._rf_amplitude = SearchSearchItemTriggerAUpperthresholdRfAmplitude( @@ -1562,11 +1563,11 @@ class SearchSearchItemTriggerASetholdThreshold(SCPICmdRead): def __init__(self, device: Optional["PIDevice"], cmd_syntax: str) -> None: super().__init__(device, cmd_syntax) - self._ref: Dict[ - int, SearchSearchItemTriggerASetholdThresholdRefItem - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerASetholdThresholdRefItem( - device, f"{self._cmd_syntax}:REF{x}" + self._ref: Dict[int, SearchSearchItemTriggerASetholdThresholdRefItem] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerASetholdThresholdRefItem( + device, f"{self._cmd_syntax}:REF{x}" + ) ) ) self._math = SearchSearchItemTriggerASetholdThresholdMath( @@ -3474,19 +3475,19 @@ class SearchSearchItemTriggerALowerthreshold(SCPICmdRead): def __init__(self, device: Optional["PIDevice"], cmd_syntax: str) -> None: super().__init__(device, cmd_syntax) - self._ch: Dict[ - int, SearchSearchItemTriggerALowerthresholdChannel - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerALowerthresholdChannel( - device, f"{self._cmd_syntax}:CH{x}" + self._ch: Dict[int, SearchSearchItemTriggerALowerthresholdChannel] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerALowerthresholdChannel( + device, f"{self._cmd_syntax}:CH{x}" + ) ) ) self._math = SearchSearchItemTriggerALowerthresholdMath(device, f"{self._cmd_syntax}:MATH") - self._ref: Dict[ - int, SearchSearchItemTriggerALowerthresholdRefItem - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerALowerthresholdRefItem( - device, f"{self._cmd_syntax}:REF{x}" + self._ref: Dict[int, SearchSearchItemTriggerALowerthresholdRefItem] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerALowerthresholdRefItem( + device, f"{self._cmd_syntax}:REF{x}" + ) ) ) self._rf_amplitude = SearchSearchItemTriggerALowerthresholdRfAmplitude( @@ -3888,19 +3889,19 @@ class SearchSearchItemTriggerALogicThreshold(SCPICmdRead): def __init__(self, device: Optional["PIDevice"], cmd_syntax: str) -> None: super().__init__(device, cmd_syntax) - self._ch: Dict[ - int, SearchSearchItemTriggerALogicThresholdChannel - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerALogicThresholdChannel( - device, f"{self._cmd_syntax}:CH{x}" + self._ch: Dict[int, SearchSearchItemTriggerALogicThresholdChannel] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerALogicThresholdChannel( + device, f"{self._cmd_syntax}:CH{x}" + ) ) ) self._math = SearchSearchItemTriggerALogicThresholdMath(device, f"{self._cmd_syntax}:MATH") - self._ref: Dict[ - int, SearchSearchItemTriggerALogicThresholdRefItem - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerALogicThresholdRefItem( - device, f"{self._cmd_syntax}:REF{x}" + self._ref: Dict[int, SearchSearchItemTriggerALogicThresholdRefItem] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerALogicThresholdRefItem( + device, f"{self._cmd_syntax}:REF{x}" + ) ) ) self._rf_amplitude = SearchSearchItemTriggerALogicThresholdRfAmplitude( @@ -4315,11 +4316,11 @@ class SearchSearchItemTriggerALogicPatternInput(SCPICmdRead): def __init__(self, device: Optional["PIDevice"], cmd_syntax: str) -> None: super().__init__(device, cmd_syntax) - self._ch: Dict[ - int, SearchSearchItemTriggerALogicPatternInputChannel - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerALogicPatternInputChannel( - device, f"{self._cmd_syntax}:CH{x}" + self._ch: Dict[int, SearchSearchItemTriggerALogicPatternInputChannel] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerALogicPatternInputChannel( + device, f"{self._cmd_syntax}:CH{x}" + ) ) ) @@ -4851,25 +4852,27 @@ class SearchSearchItemTriggerALogicInput(SCPICmdRead): def __init__(self, device: Optional["PIDevice"], cmd_syntax: str) -> None: super().__init__(device, cmd_syntax) - self._ch: Dict[ - int, SearchSearchItemTriggerALogicInputChannel - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerALogicInputChannel(device, f"{self._cmd_syntax}:CH{x}") + self._ch: Dict[int, SearchSearchItemTriggerALogicInputChannel] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerALogicInputChannel( + device, f"{self._cmd_syntax}:CH{x}" + ) + ) ) self._clock = SearchSearchItemTriggerALogicInputClock(device, f"{self._cmd_syntax}:CLOCk") - self._d: Dict[ - int, SearchSearchItemTriggerALogicInputDigitalBit - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerALogicInputDigitalBit( - device, f"{self._cmd_syntax}:D{x}" + self._d: Dict[int, SearchSearchItemTriggerALogicInputDigitalBit] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerALogicInputDigitalBit( + device, f"{self._cmd_syntax}:D{x}" + ) ) ) self._math = SearchSearchItemTriggerALogicInputMath(device, f"{self._cmd_syntax}:MATH") - self._ref: Dict[ - int, SearchSearchItemTriggerALogicInputRefItem - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerALogicInputRefItem( - device, f"{self._cmd_syntax}:REF{x}" + self._ref: Dict[int, SearchSearchItemTriggerALogicInputRefItem] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerALogicInputRefItem( + device, f"{self._cmd_syntax}:REF{x}" + ) ) ) self._rf_amplitude = SearchSearchItemTriggerALogicInputRfAmplitude( diff --git a/src/tm_devices/commands/_1jzp7o_mdodpo/trigger.py b/src/tm_devices/commands/_1jzp7o_mdodpo/trigger.py index 0baaa1f1..25dd26af 100644 --- a/src/tm_devices/commands/_1jzp7o_mdodpo/trigger.py +++ b/src/tm_devices/commands/_1jzp7o_mdodpo/trigger.py @@ -450,6 +450,7 @@ - TRIGger:STATE? - TRIGger? """ # noqa: E501 + from typing import Dict, Optional, TYPE_CHECKING from .._helpers import ( diff --git a/src/tm_devices/commands/_1kdqwg_mdo/search.py b/src/tm_devices/commands/_1kdqwg_mdo/search.py index cb644e98..d30c72b7 100644 --- a/src/tm_devices/commands/_1kdqwg_mdo/search.py +++ b/src/tm_devices/commands/_1kdqwg_mdo/search.py @@ -452,6 +452,7 @@ - SEARCH:SPECTral:LIST? - SEARCH? """ # noqa: E501 + from typing import Dict, Optional, TYPE_CHECKING from .._helpers import ( @@ -742,19 +743,19 @@ class SearchSearchItemTriggerAUpperthreshold(SCPICmdRead): def __init__(self, device: Optional["PIDevice"], cmd_syntax: str) -> None: super().__init__(device, cmd_syntax) - self._ch: Dict[ - int, SearchSearchItemTriggerAUpperthresholdChannel - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerAUpperthresholdChannel( - device, f"{self._cmd_syntax}:CH{x}" + self._ch: Dict[int, SearchSearchItemTriggerAUpperthresholdChannel] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerAUpperthresholdChannel( + device, f"{self._cmd_syntax}:CH{x}" + ) ) ) self._math = SearchSearchItemTriggerAUpperthresholdMath(device, f"{self._cmd_syntax}:MATH") - self._ref: Dict[ - int, SearchSearchItemTriggerAUpperthresholdRefItem - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerAUpperthresholdRefItem( - device, f"{self._cmd_syntax}:REF{x}" + self._ref: Dict[int, SearchSearchItemTriggerAUpperthresholdRefItem] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerAUpperthresholdRefItem( + device, f"{self._cmd_syntax}:REF{x}" + ) ) ) self._rf_amplitude = SearchSearchItemTriggerAUpperthresholdRfAmplitude( @@ -1606,11 +1607,11 @@ class SearchSearchItemTriggerASetholdThreshold(SCPICmdRead): def __init__(self, device: Optional["PIDevice"], cmd_syntax: str) -> None: super().__init__(device, cmd_syntax) - self._ref: Dict[ - int, SearchSearchItemTriggerASetholdThresholdRefItem - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerASetholdThresholdRefItem( - device, f"{self._cmd_syntax}:REF{x}" + self._ref: Dict[int, SearchSearchItemTriggerASetholdThresholdRefItem] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerASetholdThresholdRefItem( + device, f"{self._cmd_syntax}:REF{x}" + ) ) ) self._math = SearchSearchItemTriggerASetholdThresholdMath( @@ -3518,19 +3519,19 @@ class SearchSearchItemTriggerALowerthreshold(SCPICmdRead): def __init__(self, device: Optional["PIDevice"], cmd_syntax: str) -> None: super().__init__(device, cmd_syntax) - self._ch: Dict[ - int, SearchSearchItemTriggerALowerthresholdChannel - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerALowerthresholdChannel( - device, f"{self._cmd_syntax}:CH{x}" + self._ch: Dict[int, SearchSearchItemTriggerALowerthresholdChannel] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerALowerthresholdChannel( + device, f"{self._cmd_syntax}:CH{x}" + ) ) ) self._math = SearchSearchItemTriggerALowerthresholdMath(device, f"{self._cmd_syntax}:MATH") - self._ref: Dict[ - int, SearchSearchItemTriggerALowerthresholdRefItem - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerALowerthresholdRefItem( - device, f"{self._cmd_syntax}:REF{x}" + self._ref: Dict[int, SearchSearchItemTriggerALowerthresholdRefItem] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerALowerthresholdRefItem( + device, f"{self._cmd_syntax}:REF{x}" + ) ) ) self._rf_amplitude = SearchSearchItemTriggerALowerthresholdRfAmplitude( @@ -3932,19 +3933,19 @@ class SearchSearchItemTriggerALogicThreshold(SCPICmdRead): def __init__(self, device: Optional["PIDevice"], cmd_syntax: str) -> None: super().__init__(device, cmd_syntax) - self._ch: Dict[ - int, SearchSearchItemTriggerALogicThresholdChannel - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerALogicThresholdChannel( - device, f"{self._cmd_syntax}:CH{x}" + self._ch: Dict[int, SearchSearchItemTriggerALogicThresholdChannel] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerALogicThresholdChannel( + device, f"{self._cmd_syntax}:CH{x}" + ) ) ) self._math = SearchSearchItemTriggerALogicThresholdMath(device, f"{self._cmd_syntax}:MATH") - self._ref: Dict[ - int, SearchSearchItemTriggerALogicThresholdRefItem - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerALogicThresholdRefItem( - device, f"{self._cmd_syntax}:REF{x}" + self._ref: Dict[int, SearchSearchItemTriggerALogicThresholdRefItem] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerALogicThresholdRefItem( + device, f"{self._cmd_syntax}:REF{x}" + ) ) ) self._rf_amplitude = SearchSearchItemTriggerALogicThresholdRfAmplitude( @@ -4359,11 +4360,11 @@ class SearchSearchItemTriggerALogicPatternInput(SCPICmdRead): def __init__(self, device: Optional["PIDevice"], cmd_syntax: str) -> None: super().__init__(device, cmd_syntax) - self._ch: Dict[ - int, SearchSearchItemTriggerALogicPatternInputChannel - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerALogicPatternInputChannel( - device, f"{self._cmd_syntax}:CH{x}" + self._ch: Dict[int, SearchSearchItemTriggerALogicPatternInputChannel] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerALogicPatternInputChannel( + device, f"{self._cmd_syntax}:CH{x}" + ) ) ) @@ -4895,25 +4896,27 @@ class SearchSearchItemTriggerALogicInput(SCPICmdRead): def __init__(self, device: Optional["PIDevice"], cmd_syntax: str) -> None: super().__init__(device, cmd_syntax) - self._ch: Dict[ - int, SearchSearchItemTriggerALogicInputChannel - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerALogicInputChannel(device, f"{self._cmd_syntax}:CH{x}") + self._ch: Dict[int, SearchSearchItemTriggerALogicInputChannel] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerALogicInputChannel( + device, f"{self._cmd_syntax}:CH{x}" + ) + ) ) self._clock = SearchSearchItemTriggerALogicInputClock(device, f"{self._cmd_syntax}:CLOCk") - self._d: Dict[ - int, SearchSearchItemTriggerALogicInputDigitalBit - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerALogicInputDigitalBit( - device, f"{self._cmd_syntax}:D{x}" + self._d: Dict[int, SearchSearchItemTriggerALogicInputDigitalBit] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerALogicInputDigitalBit( + device, f"{self._cmd_syntax}:D{x}" + ) ) ) self._math = SearchSearchItemTriggerALogicInputMath(device, f"{self._cmd_syntax}:MATH") - self._ref: Dict[ - int, SearchSearchItemTriggerALogicInputRefItem - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerALogicInputRefItem( - device, f"{self._cmd_syntax}:REF{x}" + self._ref: Dict[int, SearchSearchItemTriggerALogicInputRefItem] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerALogicInputRefItem( + device, f"{self._cmd_syntax}:REF{x}" + ) ) ) self._rf_amplitude = SearchSearchItemTriggerALogicInputRfAmplitude( diff --git a/src/tm_devices/commands/_1kdqwg_mdo/trigger.py b/src/tm_devices/commands/_1kdqwg_mdo/trigger.py index 2bf6231a..069542a7 100644 --- a/src/tm_devices/commands/_1kdqwg_mdo/trigger.py +++ b/src/tm_devices/commands/_1kdqwg_mdo/trigger.py @@ -496,6 +496,7 @@ - TRIGger:STATE? - TRIGger? """ # noqa: E501 + from typing import Dict, Optional, TYPE_CHECKING from .._helpers import ( diff --git a/src/tm_devices/commands/_1kjd62_mdo/measurement.py b/src/tm_devices/commands/_1kjd62_mdo/measurement.py index 6b8ab14c..76d5e1e6 100644 --- a/src/tm_devices/commands/_1kjd62_mdo/measurement.py +++ b/src/tm_devices/commands/_1kjd62_mdo/measurement.py @@ -107,6 +107,7 @@ - MEASUrement:STATIstics? - MEASUrement? """ # noqa: E501 + from typing import Dict, Optional, TYPE_CHECKING from .._helpers import ( diff --git a/src/tm_devices/commands/_1kjd62_mdo/rf.py b/src/tm_devices/commands/_1kjd62_mdo/rf.py index 6f398d6a..ac622518 100644 --- a/src/tm_devices/commands/_1kjd62_mdo/rf.py +++ b/src/tm_devices/commands/_1kjd62_mdo/rf.py @@ -139,6 +139,7 @@ - RF:WINdow {RECTangular|HAMming|HANning|BLAckmanharris|KAIser|FLATtop} - RF:WINdow? """ + from typing import Optional, TYPE_CHECKING from .._helpers import SCPICmdRead, SCPICmdWrite, SCPICmdWriteNoArguments diff --git a/src/tm_devices/commands/_1kozfv_dpo/search.py b/src/tm_devices/commands/_1kozfv_dpo/search.py index 233e328a..f048b6f5 100644 --- a/src/tm_devices/commands/_1kozfv_dpo/search.py +++ b/src/tm_devices/commands/_1kozfv_dpo/search.py @@ -387,6 +387,7 @@ - SEARCH:SEARCH:TRIGger:A:UPPerthreshold:REF? - SEARCH? """ # noqa: E501 + from typing import Dict, Optional, TYPE_CHECKING from .._helpers import ( @@ -512,19 +513,19 @@ class SearchSearchItemTriggerAUpperthreshold(SCPICmdRead): def __init__(self, device: Optional["PIDevice"], cmd_syntax: str) -> None: super().__init__(device, cmd_syntax) - self._ch: Dict[ - int, SearchSearchItemTriggerAUpperthresholdChannel - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerAUpperthresholdChannel( - device, f"{self._cmd_syntax}:CH{x}" + self._ch: Dict[int, SearchSearchItemTriggerAUpperthresholdChannel] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerAUpperthresholdChannel( + device, f"{self._cmd_syntax}:CH{x}" + ) ) ) self._math = SearchSearchItemTriggerAUpperthresholdMath(device, f"{self._cmd_syntax}:MATH") - self._ref: Dict[ - int, SearchSearchItemTriggerAUpperthresholdRefItem - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerAUpperthresholdRefItem( - device, f"{self._cmd_syntax}:REF{x}" + self._ref: Dict[int, SearchSearchItemTriggerAUpperthresholdRefItem] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerAUpperthresholdRefItem( + device, f"{self._cmd_syntax}:REF{x}" + ) ) ) @@ -1273,11 +1274,11 @@ class SearchSearchItemTriggerASetholdThreshold(SCPICmdRead): def __init__(self, device: Optional["PIDevice"], cmd_syntax: str) -> None: super().__init__(device, cmd_syntax) - self._ref: Dict[ - int, SearchSearchItemTriggerASetholdThresholdRefItem - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerASetholdThresholdRefItem( - device, f"{self._cmd_syntax}:REF{x}" + self._ref: Dict[int, SearchSearchItemTriggerASetholdThresholdRefItem] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerASetholdThresholdRefItem( + device, f"{self._cmd_syntax}:REF{x}" + ) ) ) self._math = SearchSearchItemTriggerASetholdThresholdMath( @@ -3153,19 +3154,19 @@ class SearchSearchItemTriggerALowerthreshold(SCPICmdRead): def __init__(self, device: Optional["PIDevice"], cmd_syntax: str) -> None: super().__init__(device, cmd_syntax) - self._ch: Dict[ - int, SearchSearchItemTriggerALowerthresholdChannel - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerALowerthresholdChannel( - device, f"{self._cmd_syntax}:CH{x}" + self._ch: Dict[int, SearchSearchItemTriggerALowerthresholdChannel] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerALowerthresholdChannel( + device, f"{self._cmd_syntax}:CH{x}" + ) ) ) self._math = SearchSearchItemTriggerALowerthresholdMath(device, f"{self._cmd_syntax}:MATH") - self._ref: Dict[ - int, SearchSearchItemTriggerALowerthresholdRefItem - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerALowerthresholdRefItem( - device, f"{self._cmd_syntax}:REF{x}" + self._ref: Dict[int, SearchSearchItemTriggerALowerthresholdRefItem] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerALowerthresholdRefItem( + device, f"{self._cmd_syntax}:REF{x}" + ) ) ) self._rf_frequency = SearchSearchItemTriggerALowerthresholdRfFrequency( @@ -3441,19 +3442,19 @@ class SearchSearchItemTriggerALogicThreshold(SCPICmdRead): def __init__(self, device: Optional["PIDevice"], cmd_syntax: str) -> None: super().__init__(device, cmd_syntax) - self._ch: Dict[ - int, SearchSearchItemTriggerALogicThresholdChannel - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerALogicThresholdChannel( - device, f"{self._cmd_syntax}:CH{x}" + self._ch: Dict[int, SearchSearchItemTriggerALogicThresholdChannel] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerALogicThresholdChannel( + device, f"{self._cmd_syntax}:CH{x}" + ) ) ) self._math = SearchSearchItemTriggerALogicThresholdMath(device, f"{self._cmd_syntax}:MATH") - self._ref: Dict[ - int, SearchSearchItemTriggerALogicThresholdRefItem - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerALogicThresholdRefItem( - device, f"{self._cmd_syntax}:REF{x}" + self._ref: Dict[int, SearchSearchItemTriggerALogicThresholdRefItem] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerALogicThresholdRefItem( + device, f"{self._cmd_syntax}:REF{x}" + ) ) ) @@ -3771,11 +3772,11 @@ class SearchSearchItemTriggerALogicPatternInput(SCPICmdRead): def __init__(self, device: Optional["PIDevice"], cmd_syntax: str) -> None: super().__init__(device, cmd_syntax) - self._ch: Dict[ - int, SearchSearchItemTriggerALogicPatternInputChannel - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerALogicPatternInputChannel( - device, f"{self._cmd_syntax}:CH{x}" + self._ch: Dict[int, SearchSearchItemTriggerALogicPatternInputChannel] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerALogicPatternInputChannel( + device, f"{self._cmd_syntax}:CH{x}" + ) ) ) @@ -4198,25 +4199,27 @@ class SearchSearchItemTriggerALogicInput(SCPICmdRead): def __init__(self, device: Optional["PIDevice"], cmd_syntax: str) -> None: super().__init__(device, cmd_syntax) - self._ch: Dict[ - int, SearchSearchItemTriggerALogicInputChannel - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerALogicInputChannel(device, f"{self._cmd_syntax}:CH{x}") + self._ch: Dict[int, SearchSearchItemTriggerALogicInputChannel] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerALogicInputChannel( + device, f"{self._cmd_syntax}:CH{x}" + ) + ) ) self._clock = SearchSearchItemTriggerALogicInputClock(device, f"{self._cmd_syntax}:CLOCk") - self._d: Dict[ - int, SearchSearchItemTriggerALogicInputDigitalBit - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerALogicInputDigitalBit( - device, f"{self._cmd_syntax}:D{x}" + self._d: Dict[int, SearchSearchItemTriggerALogicInputDigitalBit] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerALogicInputDigitalBit( + device, f"{self._cmd_syntax}:D{x}" + ) ) ) self._math = SearchSearchItemTriggerALogicInputMath(device, f"{self._cmd_syntax}:MATH") - self._ref: Dict[ - int, SearchSearchItemTriggerALogicInputRefItem - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerALogicInputRefItem( - device, f"{self._cmd_syntax}:REF{x}" + self._ref: Dict[int, SearchSearchItemTriggerALogicInputRefItem] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerALogicInputRefItem( + device, f"{self._cmd_syntax}:REF{x}" + ) ) ) diff --git a/src/tm_devices/commands/_1l4fot_mdomso/cursor.py b/src/tm_devices/commands/_1l4fot_mdomso/cursor.py index ec308257..63b18d03 100644 --- a/src/tm_devices/commands/_1l4fot_mdomso/cursor.py +++ b/src/tm_devices/commands/_1l4fot_mdomso/cursor.py @@ -60,6 +60,7 @@ - CURSor:XY:RECTangular:Y:UNIts? - CURSor? """ + from typing import Dict, Optional, TYPE_CHECKING from .._helpers import ( diff --git a/src/tm_devices/commands/_1l5u97_mdomsodpo/measurement.py b/src/tm_devices/commands/_1l5u97_mdomsodpo/measurement.py index 3b9b77c5..51d6357b 100644 --- a/src/tm_devices/commands/_1l5u97_mdomsodpo/measurement.py +++ b/src/tm_devices/commands/_1l5u97_mdomsodpo/measurement.py @@ -105,6 +105,7 @@ - MEASUrement:STATIstics? - MEASUrement? """ # noqa: E501 + from typing import Dict, Optional, TYPE_CHECKING from .._helpers import ( diff --git a/src/tm_devices/commands/_1la1ym_msomdodpo/trigger.py b/src/tm_devices/commands/_1la1ym_msomdodpo/trigger.py index b0675ad3..d8729d02 100644 --- a/src/tm_devices/commands/_1la1ym_msomdodpo/trigger.py +++ b/src/tm_devices/commands/_1la1ym_msomdodpo/trigger.py @@ -490,6 +490,7 @@ - TRIGger:STATE? - TRIGger? """ # noqa: E501 + from typing import Dict, Optional, TYPE_CHECKING from .._helpers import ( diff --git a/src/tm_devices/commands/_1lcv3a_msodpomdo/message.py b/src/tm_devices/commands/_1lcv3a_msodpomdo/message.py index 6c8c7c66..937bafe5 100644 --- a/src/tm_devices/commands/_1lcv3a_msodpomdo/message.py +++ b/src/tm_devices/commands/_1lcv3a_msodpomdo/message.py @@ -21,6 +21,7 @@ - MESSage:STATE? - MESSage? """ + from typing import Optional, TYPE_CHECKING from .._helpers import SCPICmdRead, SCPICmdWrite, SCPICmdWriteNoArguments diff --git a/src/tm_devices/commands/_1lcv3a_msodpomdo/setup_1.py b/src/tm_devices/commands/_1lcv3a_msodpomdo/setup_1.py index c2a3d034..f127f294 100644 --- a/src/tm_devices/commands/_1lcv3a_msodpomdo/setup_1.py +++ b/src/tm_devices/commands/_1lcv3a_msodpomdo/setup_1.py @@ -15,6 +15,7 @@ - SETUP:LABEL - SETUP:TIME? """ + from typing import Optional, TYPE_CHECKING from .._helpers import SCPICmdRead, SCPICmdWrite, ValidatedDynamicNumberCmd diff --git a/src/tm_devices/commands/_1lh2st_msodpo/search.py b/src/tm_devices/commands/_1lh2st_msodpo/search.py index f332072e..b2dea9fb 100644 --- a/src/tm_devices/commands/_1lh2st_msodpo/search.py +++ b/src/tm_devices/commands/_1lh2st_msodpo/search.py @@ -425,6 +425,7 @@ - SEARCH:SEARCH:TRIGger:A:UPPerthreshold:REF? - SEARCH? """ # noqa: E501 + from typing import Dict, Optional, TYPE_CHECKING from .._helpers import ( @@ -550,19 +551,19 @@ class SearchSearchItemTriggerAUpperthreshold(SCPICmdRead): def __init__(self, device: Optional["PIDevice"], cmd_syntax: str) -> None: super().__init__(device, cmd_syntax) - self._ch: Dict[ - int, SearchSearchItemTriggerAUpperthresholdChannel - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerAUpperthresholdChannel( - device, f"{self._cmd_syntax}:CH{x}" + self._ch: Dict[int, SearchSearchItemTriggerAUpperthresholdChannel] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerAUpperthresholdChannel( + device, f"{self._cmd_syntax}:CH{x}" + ) ) ) self._math = SearchSearchItemTriggerAUpperthresholdMath(device, f"{self._cmd_syntax}:MATH") - self._ref: Dict[ - int, SearchSearchItemTriggerAUpperthresholdRefItem - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerAUpperthresholdRefItem( - device, f"{self._cmd_syntax}:REF{x}" + self._ref: Dict[int, SearchSearchItemTriggerAUpperthresholdRefItem] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerAUpperthresholdRefItem( + device, f"{self._cmd_syntax}:REF{x}" + ) ) ) @@ -1311,11 +1312,11 @@ class SearchSearchItemTriggerASetholdThreshold(SCPICmdRead): def __init__(self, device: Optional["PIDevice"], cmd_syntax: str) -> None: super().__init__(device, cmd_syntax) - self._ref: Dict[ - int, SearchSearchItemTriggerASetholdThresholdRefItem - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerASetholdThresholdRefItem( - device, f"{self._cmd_syntax}:REF{x}" + self._ref: Dict[int, SearchSearchItemTriggerASetholdThresholdRefItem] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerASetholdThresholdRefItem( + device, f"{self._cmd_syntax}:REF{x}" + ) ) ) self._math = SearchSearchItemTriggerASetholdThresholdMath( @@ -3191,19 +3192,19 @@ class SearchSearchItemTriggerALowerthreshold(SCPICmdRead): def __init__(self, device: Optional["PIDevice"], cmd_syntax: str) -> None: super().__init__(device, cmd_syntax) - self._ch: Dict[ - int, SearchSearchItemTriggerALowerthresholdChannel - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerALowerthresholdChannel( - device, f"{self._cmd_syntax}:CH{x}" + self._ch: Dict[int, SearchSearchItemTriggerALowerthresholdChannel] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerALowerthresholdChannel( + device, f"{self._cmd_syntax}:CH{x}" + ) ) ) self._math = SearchSearchItemTriggerALowerthresholdMath(device, f"{self._cmd_syntax}:MATH") - self._ref: Dict[ - int, SearchSearchItemTriggerALowerthresholdRefItem - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerALowerthresholdRefItem( - device, f"{self._cmd_syntax}:REF{x}" + self._ref: Dict[int, SearchSearchItemTriggerALowerthresholdRefItem] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerALowerthresholdRefItem( + device, f"{self._cmd_syntax}:REF{x}" + ) ) ) self._rf_frequency = SearchSearchItemTriggerALowerthresholdRfFrequency( @@ -3479,19 +3480,19 @@ class SearchSearchItemTriggerALogicThreshold(SCPICmdRead): def __init__(self, device: Optional["PIDevice"], cmd_syntax: str) -> None: super().__init__(device, cmd_syntax) - self._ch: Dict[ - int, SearchSearchItemTriggerALogicThresholdChannel - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerALogicThresholdChannel( - device, f"{self._cmd_syntax}:CH{x}" + self._ch: Dict[int, SearchSearchItemTriggerALogicThresholdChannel] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerALogicThresholdChannel( + device, f"{self._cmd_syntax}:CH{x}" + ) ) ) self._math = SearchSearchItemTriggerALogicThresholdMath(device, f"{self._cmd_syntax}:MATH") - self._ref: Dict[ - int, SearchSearchItemTriggerALogicThresholdRefItem - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerALogicThresholdRefItem( - device, f"{self._cmd_syntax}:REF{x}" + self._ref: Dict[int, SearchSearchItemTriggerALogicThresholdRefItem] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerALogicThresholdRefItem( + device, f"{self._cmd_syntax}:REF{x}" + ) ) ) @@ -3809,11 +3810,11 @@ class SearchSearchItemTriggerALogicPatternInput(SCPICmdRead): def __init__(self, device: Optional["PIDevice"], cmd_syntax: str) -> None: super().__init__(device, cmd_syntax) - self._ch: Dict[ - int, SearchSearchItemTriggerALogicPatternInputChannel - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerALogicPatternInputChannel( - device, f"{self._cmd_syntax}:CH{x}" + self._ch: Dict[int, SearchSearchItemTriggerALogicPatternInputChannel] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerALogicPatternInputChannel( + device, f"{self._cmd_syntax}:CH{x}" + ) ) ) @@ -4236,25 +4237,27 @@ class SearchSearchItemTriggerALogicInput(SCPICmdRead): def __init__(self, device: Optional["PIDevice"], cmd_syntax: str) -> None: super().__init__(device, cmd_syntax) - self._ch: Dict[ - int, SearchSearchItemTriggerALogicInputChannel - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerALogicInputChannel(device, f"{self._cmd_syntax}:CH{x}") + self._ch: Dict[int, SearchSearchItemTriggerALogicInputChannel] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerALogicInputChannel( + device, f"{self._cmd_syntax}:CH{x}" + ) + ) ) self._clock = SearchSearchItemTriggerALogicInputClock(device, f"{self._cmd_syntax}:CLOCk") - self._d: Dict[ - int, SearchSearchItemTriggerALogicInputDigitalBit - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerALogicInputDigitalBit( - device, f"{self._cmd_syntax}:D{x}" + self._d: Dict[int, SearchSearchItemTriggerALogicInputDigitalBit] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerALogicInputDigitalBit( + device, f"{self._cmd_syntax}:D{x}" + ) ) ) self._math = SearchSearchItemTriggerALogicInputMath(device, f"{self._cmd_syntax}:MATH") - self._ref: Dict[ - int, SearchSearchItemTriggerALogicInputRefItem - ] = DefaultDictPassKeyToFactory( - lambda x: SearchSearchItemTriggerALogicInputRefItem( - device, f"{self._cmd_syntax}:REF{x}" + self._ref: Dict[int, SearchSearchItemTriggerALogicInputRefItem] = ( + DefaultDictPassKeyToFactory( + lambda x: SearchSearchItemTriggerALogicInputRefItem( + device, f"{self._cmd_syntax}:REF{x}" + ) ) ) diff --git a/src/tm_devices/commands/_1ltpwt_mdomsodpo/actonevent.py b/src/tm_devices/commands/_1ltpwt_mdomsodpo/actonevent.py index fa4a97e9..0eab870f 100644 --- a/src/tm_devices/commands/_1ltpwt_mdomsodpo/actonevent.py +++ b/src/tm_devices/commands/_1ltpwt_mdomsodpo/actonevent.py @@ -37,6 +37,7 @@ - ACTONEVent:REPEATCount - ACTONEVent:REPEATCount? """ + from typing import Optional, TYPE_CHECKING from .._helpers import SCPICmdRead, SCPICmdWrite diff --git a/src/tm_devices/commands/_1ltpwt_mdomsodpo/afg.py b/src/tm_devices/commands/_1ltpwt_mdomsodpo/afg.py index 48647be7..60877789 100644 --- a/src/tm_devices/commands/_1ltpwt_mdomsodpo/afg.py +++ b/src/tm_devices/commands/_1ltpwt_mdomsodpo/afg.py @@ -60,6 +60,7 @@ - AFG:SQUare:DUty - AFG:SQUare:DUty? """ # noqa: E501 + from typing import Dict, Optional, TYPE_CHECKING from .._helpers import ( diff --git a/src/tm_devices/commands/_1ltpwt_mdomsodpo/alias.py b/src/tm_devices/commands/_1ltpwt_mdomsodpo/alias.py index 2666b2dd..4c04c3cf 100644 --- a/src/tm_devices/commands/_1ltpwt_mdomsodpo/alias.py +++ b/src/tm_devices/commands/_1ltpwt_mdomsodpo/alias.py @@ -18,6 +18,7 @@ - ALIas:STATE {|OFF|ON} - ALIas:STATE? """ + from typing import Optional, TYPE_CHECKING from .._helpers import SCPICmdRead, SCPICmdWrite, SCPICmdWriteNoArguments diff --git a/src/tm_devices/commands/_1ltpwt_mdomsodpo/application.py b/src/tm_devices/commands/_1ltpwt_mdomsodpo/application.py index de6252f2..8b458d84 100644 --- a/src/tm_devices/commands/_1ltpwt_mdomsodpo/application.py +++ b/src/tm_devices/commands/_1ltpwt_mdomsodpo/application.py @@ -17,6 +17,7 @@ - APPLication:TYPe {POWer|LIMITMask|VIDPic|ACTONEVent|NONe} - APPLication:TYPe? """ + from typing import Dict, Optional, TYPE_CHECKING from .._helpers import ( diff --git a/src/tm_devices/commands/_1ltpwt_mdomsodpo/autoset.py b/src/tm_devices/commands/_1ltpwt_mdomsodpo/autoset.py index 802f5dfd..0cb3eaa0 100644 --- a/src/tm_devices/commands/_1ltpwt_mdomsodpo/autoset.py +++ b/src/tm_devices/commands/_1ltpwt_mdomsodpo/autoset.py @@ -15,6 +15,7 @@ - AUTOSet:ENAble {OFF|ON|0|1} - AUTOSet:ENAble? """ + from typing import Optional, TYPE_CHECKING from .._helpers import SCPICmdRead, SCPICmdWrite diff --git a/src/tm_devices/commands/_1ltpwt_mdomsodpo/auxin.py b/src/tm_devices/commands/_1ltpwt_mdomsodpo/auxin.py index 67f5f808..dd27fba3 100644 --- a/src/tm_devices/commands/_1ltpwt_mdomsodpo/auxin.py +++ b/src/tm_devices/commands/_1ltpwt_mdomsodpo/auxin.py @@ -30,6 +30,7 @@ - AUXin:PRObe? - AUXin? """ + from typing import Optional, TYPE_CHECKING from .._helpers import SCPICmdRead, SCPICmdWrite, SCPICmdWriteNoArguments diff --git a/src/tm_devices/commands/_1ltpwt_mdomsodpo/auxout.py b/src/tm_devices/commands/_1ltpwt_mdomsodpo/auxout.py index a2a77dc0..8370e758 100644 --- a/src/tm_devices/commands/_1ltpwt_mdomsodpo/auxout.py +++ b/src/tm_devices/commands/_1ltpwt_mdomsodpo/auxout.py @@ -14,6 +14,7 @@ - AUXOut:SOUrce {ATRIGger|MAIn|REFOut|EVENT|AFG} - AUXOut:SOUrce? """ + from typing import Optional, TYPE_CHECKING from .._helpers import SCPICmdRead, SCPICmdWrite diff --git a/src/tm_devices/commands/_1ltpwt_mdomsodpo/bus.py b/src/tm_devices/commands/_1ltpwt_mdomsodpo/bus.py index 752bc081..cec40a1b 100644 --- a/src/tm_devices/commands/_1ltpwt_mdomsodpo/bus.py +++ b/src/tm_devices/commands/_1ltpwt_mdomsodpo/bus.py @@ -227,6 +227,7 @@ - BUS:UPPerthreshold:REF? - BUS? """ + from typing import Dict, Optional, TYPE_CHECKING from .._helpers import ( diff --git a/src/tm_devices/commands/_1ltpwt_mdomsodpo/calibrate.py b/src/tm_devices/commands/_1ltpwt_mdomsodpo/calibrate.py index 48687fcd..ca00673b 100644 --- a/src/tm_devices/commands/_1ltpwt_mdomsodpo/calibrate.py +++ b/src/tm_devices/commands/_1ltpwt_mdomsodpo/calibrate.py @@ -36,6 +36,7 @@ - CALibrate:RF:STATus? - CALibrate:TEMPerature? """ + from typing import Optional, TYPE_CHECKING from .._helpers import SCPICmdRead, SCPICmdWrite, SCPICmdWriteNoArguments diff --git a/src/tm_devices/commands/_1ltpwt_mdomsodpo/ch.py b/src/tm_devices/commands/_1ltpwt_mdomsodpo/ch.py index ea574dc7..0bdfcbfe 100644 --- a/src/tm_devices/commands/_1ltpwt_mdomsodpo/ch.py +++ b/src/tm_devices/commands/_1ltpwt_mdomsodpo/ch.py @@ -66,6 +66,7 @@ - CH:YUNits? - CH? """ + from typing import Optional, TYPE_CHECKING from .._helpers import SCPICmdRead, SCPICmdWrite, ValidatedChannel diff --git a/src/tm_devices/commands/_1ltpwt_mdomsodpo/d.py b/src/tm_devices/commands/_1ltpwt_mdomsodpo/d.py index 0327eaf2..12a8672d 100644 --- a/src/tm_devices/commands/_1ltpwt_mdomsodpo/d.py +++ b/src/tm_devices/commands/_1ltpwt_mdomsodpo/d.py @@ -19,6 +19,7 @@ - D:THReshold {ECL|TTL|} - D:THReshold? """ + from typing import Optional, TYPE_CHECKING from .._helpers import SCPICmdRead, SCPICmdWrite, SCPICmdWriteNoArguments, ValidatedDigitalBit diff --git a/src/tm_devices/commands/_1ltpwt_mdomsodpo/data.py b/src/tm_devices/commands/_1ltpwt_mdomsodpo/data.py index d31560a3..e5fdafb6 100644 --- a/src/tm_devices/commands/_1ltpwt_mdomsodpo/data.py +++ b/src/tm_devices/commands/_1ltpwt_mdomsodpo/data.py @@ -27,6 +27,7 @@ - DATa:WIDth? - DATa? """ # noqa: E501 + from typing import Optional, TYPE_CHECKING from .._helpers import SCPICmdRead, SCPICmdWrite diff --git a/src/tm_devices/commands/_1ltpwt_mdomsodpo/diag.py b/src/tm_devices/commands/_1ltpwt_mdomsodpo/diag.py index 8c440a73..d6355c59 100644 --- a/src/tm_devices/commands/_1ltpwt_mdomsodpo/diag.py +++ b/src/tm_devices/commands/_1ltpwt_mdomsodpo/diag.py @@ -22,6 +22,7 @@ - DIAg:SELect {ALL|APPKey|CPU|DISplay|FPAnel|IO|ROM|ACQ|RF|AFG} - DIAg:STATE {EXECute|ABORt} """ + from typing import Optional, TYPE_CHECKING from .._helpers import SCPICmdRead, SCPICmdWrite, SCPICmdWriteNoArguments diff --git a/src/tm_devices/commands/_1ltpwt_mdomsodpo/dvm.py b/src/tm_devices/commands/_1ltpwt_mdomsodpo/dvm.py index d61e9987..cd92d34d 100644 --- a/src/tm_devices/commands/_1ltpwt_mdomsodpo/dvm.py +++ b/src/tm_devices/commands/_1ltpwt_mdomsodpo/dvm.py @@ -28,6 +28,7 @@ - DVM:SOUrce {CH} - DVM:SOUrce? """ + from typing import Optional, TYPE_CHECKING from .._helpers import SCPICmdRead, SCPICmdWrite diff --git a/src/tm_devices/commands/_1ltpwt_mdomsodpo/email.py b/src/tm_devices/commands/_1ltpwt_mdomsodpo/email.py index 81872520..f4515d1b 100644 --- a/src/tm_devices/commands/_1ltpwt_mdomsodpo/email.py +++ b/src/tm_devices/commands/_1ltpwt_mdomsodpo/email.py @@ -23,6 +23,7 @@ - EMAIL:SETUp:SMTPServer - EMAIL:SETUp:SMTPServer? """ + from typing import Optional, TYPE_CHECKING from .._helpers import SCPICmdRead, SCPICmdWrite diff --git a/src/tm_devices/commands/_1ltpwt_mdomsodpo/ethernet.py b/src/tm_devices/commands/_1ltpwt_mdomsodpo/ethernet.py index f0a593f8..c8e2be6d 100644 --- a/src/tm_devices/commands/_1ltpwt_mdomsodpo/ethernet.py +++ b/src/tm_devices/commands/_1ltpwt_mdomsodpo/ethernet.py @@ -44,6 +44,7 @@ - ETHERnet:SUBNETMask - ETHERnet:SUBNETMask? """ + from typing import Optional, TYPE_CHECKING from .._helpers import SCPICmdRead, SCPICmdWrite, SCPICmdWriteNoArguments diff --git a/src/tm_devices/commands/_1ltpwt_mdomsodpo/filesystem.py b/src/tm_devices/commands/_1ltpwt_mdomsodpo/filesystem.py index 3427cf05..46fd7d62 100644 --- a/src/tm_devices/commands/_1ltpwt_mdomsodpo/filesystem.py +++ b/src/tm_devices/commands/_1ltpwt_mdomsodpo/filesystem.py @@ -29,6 +29,7 @@ - FILESystem:WRITEFile , - FILESystem? """ + from typing import Optional, TYPE_CHECKING from .._helpers import SCPICmdRead, SCPICmdWrite, SCPICmdWriteNoArguments diff --git a/src/tm_devices/commands/_1ltpwt_mdomsodpo/fpanel.py b/src/tm_devices/commands/_1ltpwt_mdomsodpo/fpanel.py index d9fac446..14f5c04c 100644 --- a/src/tm_devices/commands/_1ltpwt_mdomsodpo/fpanel.py +++ b/src/tm_devices/commands/_1ltpwt_mdomsodpo/fpanel.py @@ -15,6 +15,7 @@ - FPAnel:PRESS