diff --git a/.github/workflows/deploy-documentation.yml b/.github/workflows/deploy-documentation.yml index 7ac551e7..3427d472 100644 --- a/.github/workflows/deploy-documentation.yml +++ b/.github/workflows/deploy-documentation.yml @@ -20,7 +20,7 @@ jobs: url: ${{ steps.deployment.outputs.page_url }} steps: - name: Download Artifact - uses: dawidd6/action-download-artifact@v3.1.2 + uses: dawidd6/action-download-artifact@v3.1.4 with: github_token: ${{ secrets.GITHUB_TOKEN }} run_id: ${{ github.event.workflow_run.id }} diff --git a/.github/workflows/package-build.yml b/.github/workflows/package-build.yml index fb055820..bfe62d42 100644 --- a/.github/workflows/package-build.yml +++ b/.github/workflows/package-build.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: hynek/build-and-inspect-python-package@v2.0.1 + - uses: hynek/build-and-inspect-python-package@v2.0.2 id: build-pkg - name: Set up Python uses: actions/setup-python@v5 diff --git a/.github/workflows/package-release.yml b/.github/workflows/package-release.yml index 816b14e2..e9ac45d4 100644 --- a/.github/workflows/package-release.yml +++ b/.github/workflows/package-release.yml @@ -59,7 +59,7 @@ jobs: python scripts/check_unreleased_changelog_items.py git config --global tag.gpgSign true - name: Python Semantic Release - uses: python-semantic-release/python-semantic-release@v9.1.1 + uses: python-semantic-release/python-semantic-release@v9.3.1 id: release with: force: ${{ inputs.release_level }} @@ -82,7 +82,7 @@ jobs: ref: main # Make sure to check out the latest commit on main, not the original commit that triggered the workflow fetch-depth: 0 - name: Build package - uses: hynek/build-and-inspect-python-package@v2.0.1 + uses: hynek/build-and-inspect-python-package@v2.0.2 upload-testpypi: name: Upload package to TestPyPI needs: [pypi-build] @@ -98,7 +98,7 @@ jobs: name: Packages path: dist - name: Upload package to Test PyPI - uses: pypa/gh-action-pypi-publish@v1.8.11 + uses: pypa/gh-action-pypi-publish@v1.8.14 with: repository-url: https://test.pypi.org/legacy/ upload-pypi: @@ -116,7 +116,7 @@ jobs: name: Packages path: dist - name: Upload package to PyPI - uses: pypa/gh-action-pypi-publish@v1.8.11 + uses: pypa/gh-action-pypi-publish@v1.8.14 upload-github: name: Upload package to GitHub Release needs: [upload-pypi] diff --git a/.github/workflows/package-testpypi.yml b/.github/workflows/package-testpypi.yml index b034a85e..1bd4e562 100644 --- a/.github/workflows/package-testpypi.yml +++ b/.github/workflows/package-testpypi.yml @@ -32,7 +32,7 @@ jobs: python scripts/project_version.py --set-version=$NEW_VERSION echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_OUTPUT - name: Build package - uses: hynek/build-and-inspect-python-package@v2.0.1 + uses: hynek/build-and-inspect-python-package@v2.0.2 outputs: built-version: ${{ steps.create-version.outputs.NEW_VERSION }} test-pypi-upload: @@ -50,7 +50,7 @@ jobs: name: Packages path: dist - name: Upload package to Test PyPI - uses: pypa/gh-action-pypi-publish@v1.8.11 + uses: pypa/gh-action-pypi-publish@v1.8.14 with: repository-url: https://test.pypi.org/legacy/ test-pypi-install: diff --git a/.github/workflows/sbom-scan.yml b/.github/workflows/sbom-scan.yml index 3f09f38f..31950e25 100644 --- a/.github/workflows/sbom-scan.yml +++ b/.github/workflows/sbom-scan.yml @@ -10,6 +10,8 @@ on: jobs: create-and-scan-sbom: runs-on: ubuntu-latest + permissions: + security-events: write steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 @@ -31,7 +33,13 @@ jobs: sbom: ${{ github.event.repository.name }}-sbom.spdx.json fail-build: true severity-cutoff: low - - name: Upload SBOM scan SARIF report + - name: Upload SBOM scan SARIF report as a workflow artifact + uses: actions/upload-artifact@v4 + with: + name: sarif_artifact + path: ${{ steps.scan.outputs.sarif }} + if-no-files-found: error + - name: Upload SBOM scan SARIF report to GitHub UI Security tab if: ${{ github.event_name != 'pull_request' }} uses: github/codeql-action/upload-sarif@v3 with: diff --git a/.github/workflows/test-code.yml b/.github/workflows/test-code.yml index 8ce1bccb..1b7bf540 100644 --- a/.github/workflows/test-code.yml +++ b/.github/workflows/test-code.yml @@ -56,7 +56,7 @@ jobs: - name: Install tox run: | python -m pip install --upgrade pip - python -m pip install --upgrade tox + python -m pip install --upgrade tox coverage - name: Test run: tox -ve tests - uses: actions/upload-artifact@v4 @@ -67,13 +67,14 @@ jobs: .results_*/** .coverage* - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 if: ${{ !cancelled() }} with: token: ${{ secrets.CODECOV_TOKEN }} files: ./.coverage_tests.xml name: codecov-${{ matrix.os_name }} fail_ci_if_error: true + verbose: true # Check that all jobs passed check-tests-passed: if: ${{ !cancelled() }} diff --git a/.github/workflows/test-docs.yml b/.github/workflows/test-docs.yml index a8a8337c..b56b5c10 100644 --- a/.github/workflows/test-docs.yml +++ b/.github/workflows/test-docs.yml @@ -22,7 +22,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: 18 # The node version needs to stay in sync with .readthedocs.yml + node-version: 20 # The node version needs to stay in sync with .readthedocs.yml - run: npm install -g @mermaid-js/mermaid-cli - run: sudo apt install --no-install-recommends --assume-yes graphviz - name: Set up Python diff --git a/.github/workflows/update-python-and-pre-commit-dependencies.yml b/.github/workflows/update-python-and-pre-commit-dependencies.yml index 87e1225b..a00a2b4d 100644 --- a/.github/workflows/update-python-and-pre-commit-dependencies.yml +++ b/.github/workflows/update-python-and-pre-commit-dependencies.yml @@ -7,7 +7,7 @@ jobs: update-python-and-pre-commit-deps: name: Update python linters and pre-commit dependencies runs-on: ubuntu-latest - if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' && contains(github.head_ref, '/pip/') }} + if: ${{ github.actor == 'dependabot[bot]' && contains(github.head_ref, '/pip/') }} permissions: contents: write steps: @@ -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/.gitignore b/.gitignore index 517da526..3739b50a 100644 --- a/.gitignore +++ b/.gitignore @@ -20,7 +20,7 @@ __pycache__/ .Python build/ develop-eggs/ -dist/ +dist*/ downloads/ eggs/ .eggs/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index abc710c0..70b0654f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -41,7 +41,7 @@ repos: - id: check-github-actions - id: check-github-workflows - repo: https://github.com/commitizen-tools/commitizen - rev: v3.16.0 + rev: v3.20.0 hooks: - id: commitizen stages: [commit-msg] @@ -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.4 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] diff --git a/.readthedocs.yml b/.readthedocs.yml index 79b703b1..b2014607 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -6,7 +6,7 @@ build: os: ubuntu-22.04 tools: python: '3.11' # This needs to stay in sync with pyproject.toml and any CI scripts - nodejs: '18' # This needs to stay in sync with any CI scripts + nodejs: '20' # This needs to stay in sync with any CI scripts jobs: post_install: [npm install -g @mermaid-js/mermaid-cli] # Configuration diff --git a/CHANGELOG.md b/CHANGELOG.md index ccc2f17e..1815d37d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,14 @@ ______________________________________________________________________ Things to be included in the next release go here. +### Changed + +- Updated the `get_model_series()` function to only warn the user if the model is not found in the `SupportedModels` enumeration. This also eliminates false warnings during unit tests. + +### Fixed + +- Updated the measurement source selection command for the MDO3K, MDO4K, MSO4K and DPO4K models to work properly. + ______________________________________________________________________ ## v1.2.1 (2024-02-27) 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/docs/contributing/add_new_driver.md b/docs/contributing/add_new_driver.md index ccc1e424..7cbc2577 100644 --- a/docs/contributing/add_new_driver.md +++ b/docs/contributing/add_new_driver.md @@ -32,19 +32,17 @@ This guide will walk through the steps needed to add a new device driver. `tm_devices/drivers/__init__.py` 07. Update the `__all__` variable inside `tm_devices/drivers/__init__.py` to include the new device driver -08. Update the appropriate Type Alias in `device_manager.py` (search for "Type - Aliases") -09. If the device supports VISA USBTMC communication, update the +08. If the device supports VISA USBTMC communication, update the `USB_MODEL_ID_LOOKUP` lookup exposed in `tm_devices/helpers/__init__.py` -10. Update the Supported Devices section in `README.rst` to include the new model -11. Update unit tests (and simulated device files) +09. Update the Supported Devices section in `README.rst` to include the new model +10. Update unit tests (and simulated device files) 1. Add a new simulated device driver in the correct folder within `tests/sim_devices` 2. Update `tests/sim_devices/devices.yaml` with a new resource for the new driver (Make sure the device name is correct in the `devices.yaml` and in the corresponding simulated device file) 3. Update `tests/test_all_device_drivers.py` with the new simulated resource -12. Run the `tests/verify_physical_device_support.py` script targeting a +11. Run the `tests/verify_physical_device_support.py` script targeting a physical device that will use the newly created driver to verify it is working properly. 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..b12bed8b 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 @@ -23,9 +24,9 @@ def custom_method(self, value: str) -> None: with DeviceManager(external_device_drivers=CUSTOM_DEVICE_DRIVERS) as device_manager: # Add a scope that is currently supported by the package - mso5: MSO5 = device_manager.add_scope("192.168.0.1") # pyright: ignore[reportAssignmentType] + mso5: MSO5 = device_manager.add_scope("192.168.0.1") # Add the custom scope - custom_scope: CustomScope = device_manager.add_scope("192.168.0.2") # pyright: ignore[reportAssignmentType] + custom_scope: CustomScope = device_manager.add_scope("192.168.0.2") # Custom drivers inherit all methods custom_scope.expect_esr(0) # check for no errors diff --git a/examples/miscellaneous/disable_command_verification.py b/examples/miscellaneous/disable_command_verification.py index 9151eae5..e57042e6 100644 --- a/examples/miscellaneous/disable_command_verification.py +++ b/examples/miscellaneous/disable_command_verification.py @@ -1,11 +1,12 @@ """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 with DeviceManager(verbose=True) as dm: # Add some devices - scope: MSO5 = dm.add_scope("192.168.0.1") # pyright: ignore[reportAssignmentType] - smu: SMU2601B = dm.add_smu("192.168.0.2") # pyright: ignore[reportAssignmentType] + scope: MSO5 = dm.add_scope("192.168.0.1") + smu: SMU2601B = dm.add_smu("192.168.0.2") # # Set some values and use verification to verify they were set properly. 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..33ac6b1a 100644 --- a/examples/scopes/tekscope/basic_save_recall.py +++ b/examples/scopes/tekscope/basic_save_recall.py @@ -1,10 +1,11 @@ """An example of saving and recalling a waveform and session file.""" + from tm_devices import DeviceManager from tm_devices.drivers import MSO6B with DeviceManager(verbose=True) as dm: # Get a scope - scope: MSO6B = dm.add_scope("192.168.1.177") # pyright: ignore[reportAssignmentType] + scope: MSO6B = dm.add_scope("192.168.1.177") # Send some commands scope.add_new_math("MATH1", "CH1") # add MATH1 to CH1 diff --git a/examples/scopes/tekscope/generate_internal_afg_signal.py b/examples/scopes/tekscope/generate_internal_afg_signal.py index f9658fd1..b656a20f 100644 --- a/examples/scopes/tekscope/generate_internal_afg_signal.py +++ b/examples/scopes/tekscope/generate_internal_afg_signal.py @@ -1,10 +1,11 @@ """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 with DeviceManager(verbose=True) as dm: # Create a connection to the scope and indicate that it is a MSO5 scope for type hinting - scope: MSO5 = dm.add_scope("192.168.1.102") # pyright: ignore[reportAssignmentType] + scope: MSO5 = dm.add_scope("192.168.1.102") # Generate the signal scope.commands.afg.frequency.write(10e6) # set frequency diff --git a/examples/scopes/tekscope/get_acquisition_data.py b/examples/scopes/tekscope/get_acquisition_data.py index 9d6d8cb5..8257ee6a 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 @@ -12,7 +13,7 @@ device_manager.visa_library = PYVISA_PY_BACKEND # Creating Scope driver object by providing ip address. - scope: MSO6B = device_manager.add_scope("127.0.0.1") # pyright: ignore[reportAssignmentType] + scope: MSO6B = device_manager.add_scope("127.0.0.1") # Turn on channel 1 scope.commands.display.waveview1.ch[1].state.write("ON") diff --git a/examples/scopes/tekscope_70k/dpojet/adding_dpojet_measurements.py b/examples/scopes/tekscope_70k/dpojet/adding_dpojet_measurements.py index 265ea7b4..1b88cb12 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 @@ -12,7 +13,7 @@ device_manager.visa_library = PYVISA_PY_BACKEND # Creating one 7K/70K/SX Scope driver object by providing ip address. - scope: MSO70KDX = device_manager.add_scope("127.0.0.1") # pyright: ignore[reportAssignmentType] + scope: MSO70KDX = device_manager.add_scope("127.0.0.1") # Starting DPOJET scope.commands.dpojet.activate.write() diff --git a/examples/source_measure_units/2400/smu_2400_load_script_and_run.py b/examples/source_measure_units/2400/smu_2400_load_script_and_run.py index 92642d79..e105ef85 100644 --- a/examples/source_measure_units/2400/smu_2400_load_script_and_run.py +++ b/examples/source_measure_units/2400/smu_2400_load_script_and_run.py @@ -20,7 +20,7 @@ # Main code starts here with instantiation of the device manager and the SMU instrument connection. devmgr = DeviceManager(verbose=True) -smu2400: SMU2450 = devmgr.add_smu("192.168.0.1", alias="my2450") # pyright: ignore[reportAssignmentType] +smu2400: SMU2450 = devmgr.add_smu("192.168.0.1", alias="my2450") smu2400.enable_verification = False # Capture the path to the script file and load it to working memory. diff --git a/examples/source_measure_units/2400/smu_2450_leakage_current.py b/examples/source_measure_units/2400/smu_2450_leakage_current.py index 859285e7..33cf1288 100644 --- a/examples/source_measure_units/2400/smu_2450_leakage_current.py +++ b/examples/source_measure_units/2400/smu_2450_leakage_current.py @@ -13,7 +13,7 @@ from tm_devices.drivers import SMU2450 with DeviceManager(verbose=False) as device_manager: - inst: SMU2450 = device_manager.add_smu("192.168.1.4", alias="my2450") # pyright: ignore[reportAssignmentType] + inst: SMU2450 = device_manager.add_smu("192.168.1.4", alias="my2450") # Reset the instrument, which also clears the buffer. inst.commands.reset() diff --git a/examples/source_measure_units/2400/smu_2450_linear_sweep_current.py b/examples/source_measure_units/2400/smu_2450_linear_sweep_current.py index 1b97902c..d5b0b06f 100644 --- a/examples/source_measure_units/2400/smu_2450_linear_sweep_current.py +++ b/examples/source_measure_units/2400/smu_2450_linear_sweep_current.py @@ -16,7 +16,7 @@ from tm_devices.drivers import SMU2450 with DeviceManager() as device_manager: - smu2450: SMU2450 = device_manager.add_smu( # pyright: ignore[reportAssignmentType] + smu2450: SMU2450 = device_manager.add_smu( "USB0::0x05E6::0x2450::01419969::INSTR", alias="my2450" ) diff --git a/examples/source_measure_units/2400/smu_2450_measuring_lowr_devices.py b/examples/source_measure_units/2400/smu_2450_measuring_lowr_devices.py index 09454dc8..aa930091 100644 --- a/examples/source_measure_units/2400/smu_2450_measuring_lowr_devices.py +++ b/examples/source_measure_units/2400/smu_2450_measuring_lowr_devices.py @@ -21,7 +21,7 @@ with DeviceManager() as device_manager: print(device_manager.get_available_devices()) - inst: SMU2450 = device_manager.add_smu("192.168.4.74", alias="my2450") # pyright: ignore[reportAssignmentType] + inst: SMU2450 = device_manager.add_smu("192.168.4.74", alias="my2450") # Configure the Simple Loop trigger model template to make 100 readings. inst.commands.trigger.model.load_simple_loop(100) diff --git a/examples/source_measure_units/2400/smu_2450_rechargeable_battery.py b/examples/source_measure_units/2400/smu_2450_rechargeable_battery.py index f40f9a7b..212b9142 100644 --- a/examples/source_measure_units/2400/smu_2450_rechargeable_battery.py +++ b/examples/source_measure_units/2400/smu_2450_rechargeable_battery.py @@ -19,7 +19,7 @@ with DeviceManager() as device_manager: print(device_manager.get_available_devices()) - inst: SMU2450 = device_manager.add_smu("192.168.4.74", alias="my2450") # pyright: ignore[reportAssignmentType] + inst: SMU2450 = device_manager.add_smu("192.168.4.74", alias="my2450") # Clear the buffer. inst.commands.buffer_var["defbuffer1"].clear() diff --git a/examples/source_measure_units/2400/smu_2450_solar_cell.py b/examples/source_measure_units/2400/smu_2450_solar_cell.py index ff985938..56dba26c 100644 --- a/examples/source_measure_units/2400/smu_2450_solar_cell.py +++ b/examples/source_measure_units/2400/smu_2450_solar_cell.py @@ -15,7 +15,7 @@ with DeviceManager() as device_manager: print(device_manager.get_available_devices()) - inst: SMU2450 = device_manager.add_smu("192.168.4.74", alias="my2450") # pyright: ignore[reportAssignmentType] + inst: SMU2450 = device_manager.add_smu("192.168.4.74", alias="my2450") # Define the number of points in the sweep. POINTS = 56 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..a247a95d 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 @@ -24,7 +25,7 @@ LIMIT = 7 with DeviceManager(verbose=True) as dm: - inst: SMU2460 = dm.add_smu(RESOURCE_ID) # pyright: ignore[reportAssignmentType] + inst: SMU2460 = dm.add_smu(RESOURCE_ID) # Set to current source and set up source config list inst.commands.smu.source.configlist.create("OutputList") 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..50090727 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 @@ -25,7 +26,7 @@ S_DELAY = 0.05 with DeviceManager(verbose=False) as dm: - inst: SMU2460 = dm.add_smu(RESOURCE_ID) # pyright: ignore[reportAssignmentType] + inst: SMU2460 = dm.add_smu(RESOURCE_ID) # Reset the Model 2460 and clear its buffer. inst.commands.reset() 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..45fbf4f4 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 @@ -10,7 +11,7 @@ with DeviceManager() as device_manager: print(device_manager.get_available_devices()) - smu2461: SMU2461 = device_manager.add_smu("TCPIP::0.0.0.0::inst0::INSTR", alias="my2461") # pyright: ignore[reportAssignmentType] + smu2461: SMU2461 = device_manager.add_smu("TCPIP::0.0.0.0::inst0::INSTR", alias="my2461") # Reset the instrument smu2461.commands.reset() 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..c6814cae 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 @@ -4,12 +4,13 @@ constantly taking digitizer readings at a rate of 500,000 samples per second. The application is set up to make 500us pulses with 500us of off time after each pulse. -The Model 2461's pulse commands are used to generate the trigger model necessary for pulsing. All of +The Model 2461's pulse commands are used to generate the trigger model necessary for pulsing. All the source and measure settings are configured before the pulse command (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. +arguments so the arguments are stored in variables to make them easier to read. """ -from typing import cast, List + +from typing import List from tm_devices import DeviceManager from tm_devices.drivers import SMU2461 @@ -17,9 +18,7 @@ with DeviceManager() as device_manager: print(device_manager.get_available_devices()) - smu2461: SMU2461 = cast( - SMU2461, device_manager.add_smu("TCPIP::0.0.0.0::inst0::INSTR", alias="my2461") - ) # 192.168.0.2 + smu2461: SMU2461 = device_manager.add_smu("TCPIP::0.0.0.0::inst0::INSTR", alias="my2461") # Reset the instrument smu2461.commands.reset() diff --git a/examples/source_measure_units/2400/smu_2461_pulse_sweep_trigger_out.py b/examples/source_measure_units/2400/smu_2461_pulse_sweep_trigger_out.py index 37933707..10db01f1 100644 --- a/examples/source_measure_units/2400/smu_2461_pulse_sweep_trigger_out.py +++ b/examples/source_measure_units/2400/smu_2461_pulse_sweep_trigger_out.py @@ -88,7 +88,7 @@ def pulse_delay_calc(pulse_width: str) -> float: with DeviceManager() as device_manager: print(device_manager.get_available_devices()) - smu2461: SMU2461 = device_manager.add_smu( # pyright: ignore[reportAssignmentType] + smu2461: SMU2461 = device_manager.add_smu( "TCPIP::0.0.0.0::inst0::INSTR", alias="my2461" ) # 192.168.0.2 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..6b0776b1 100644 --- a/examples/source_measure_units/2400/smu_2470_insulation_resistance.py +++ b/examples/source_measure_units/2400/smu_2470_insulation_resistance.py @@ -3,13 +3,14 @@ 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 from tm_devices.drivers import SMU2470 with DeviceManager(verbose=False) as device_manager: - smu2470: SMU2470 = device_manager.add_smu( # pyright: ignore[reportAssignmentType] + smu2470: SMU2470 = device_manager.add_smu( "TCPIP::0.0.0.0::inst0::INSTR", alias="my2470" ) # 192.168.0.2 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..d4606727 100644 --- a/examples/source_measure_units/2400/smu_2470_mosfet_leakage.py +++ b/examples/source_measure_units/2400/smu_2470_mosfet_leakage.py @@ -4,13 +4,14 @@ 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 from tm_devices.drivers import SMU2470 with DeviceManager(verbose=False) as device_manager: - smu2470: SMU2470 = device_manager.add_smu("TCPIP::0.0.0.0::inst0::INSTR", alias="my2470") # pyright: ignore[reportAssignmentType] + smu2470: SMU2470 = device_manager.add_smu("TCPIP::0.0.0.0::inst0::INSTR", alias="my2470") # Reset the instrument, which also clears the buffer. smu2470.commands.reset() diff --git a/examples/source_measure_units/2600/reading_dynamic_buffers.py b/examples/source_measure_units/2600/reading_dynamic_buffers.py index 6d0f35e5..057e82df 100644 --- a/examples/source_measure_units/2600/reading_dynamic_buffers.py +++ b/examples/source_measure_units/2600/reading_dynamic_buffers.py @@ -1,10 +1,11 @@ """An example of creating and reading from a dynamic buffer.""" + from tm_devices import DeviceManager from tm_devices.drivers import SMU2601B with DeviceManager() as device_manager: # Create a SMU and type hint it as a 2601B - smu: SMU2601B = device_manager.add_smu("192.168.0.1") # pyright: ignore[reportAssignmentType] + smu: SMU2601B = device_manager.add_smu("192.168.0.1") # Create a buffer BUFFER_NAME = "mybuffer" 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..dd426221 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 @@ -108,5 +109,5 @@ def waveform_sweep(inst: SMU2602B) -> None: # RUN TEST with DeviceManager(verbose=False) as DM: - inst_driver: SMU2602B = DM.add_smu(RESOURCE_ID) # pyright: ignore[reportAssignmentType] + inst_driver: SMU2602B = DM.add_smu(RESOURCE_ID) waveform_sweep(inst_driver) 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..f4000de8 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 @@ -307,6 +308,6 @@ def display_results(sep: str = "\t") -> None: # Connect to instrument and begin testing. with DeviceManager(verbose=False) as DM: - smu_driver: SMU2602B = DM.add_smu(RESOURCE_ID) # pyright: ignore[reportAssignmentType] + smu_driver: SMU2602B = DM.add_smu(RESOURCE_ID) bjt_slow(smu_driver) 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..39c5cf7b 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 @@ -417,7 +418,7 @@ def display_bins_status() -> None: # Connect to instrument and begin testing with DeviceManager(verbose=False) as DM: - smu_driver: SMU2602B = DM.add_smu(RESOURCE_ID) # pyright: ignore[reportAssignmentType] + smu_driver: SMU2602B = DM.add_smu(RESOURCE_ID) # Save settings in temporary variables so they can be restored after completion. s_func = smu_driver.commands.smu["a"].source.func 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..f4058972 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 @@ -220,7 +221,7 @@ def capture_pulse_v(inst: SMU2651A) -> None: # RUN TEST with DeviceManager() as DM: - inst_driver: SMU2651A = DM.add_smu(RESOURCE_ID) # pyright: ignore[reportAssignmentType] + inst_driver: SMU2651A = DM.add_smu(RESOURCE_ID) capture_pulse_i(inst_driver) capture_pulse_v(inst_driver) 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..9c6919b4 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 @@ -30,7 +31,7 @@ def dioderl_swp( # noqa: PLR0915 source_delay: The delay between the start of source and the source complete event. """ with DeviceManager() as dev_man: - smu2657a: SMU2657A = dev_man.add_smu( # pyright: ignore[reportAssignmentType] + smu2657a: SMU2657A = dev_man.add_smu( address="TCPIP::0.0.0.0::inst0::INSTR", alias="my2657a" ) # 192.168.0.2 # Reset and initialize instrument 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..7bbe9eab 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 @@ -92,5 +93,5 @@ def capacitor_leakage(inst: SMU2657A) -> None: with DeviceManager() as DM: - smu_driver: SMU2657A = DM.add_smu(RESOURCE_ID) # pyright: ignore[reportAssignmentType] + smu_driver: SMU2657A = DM.add_smu(RESOURCE_ID) capacitor_leakage(smu_driver) 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..720e1fc3 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 @@ -33,8 +34,8 @@ with DeviceManager(verbose=False) as DM: # Replace the SMU2636B class with the instrument you are using for this test. - smu2657a: SMU2657A = DM.add_smu(SMU1_ID) # pyright: ignore[reportAssignmentType] - smu26xx: SMU2636B = DM.add_smu(SMU2_ID) # pyright: ignore[reportAssignmentType] + smu2657a: SMU2657A = DM.add_smu(SMU1_ID) + smu26xx: SMU2636B = DM.add_smu(SMU2_ID) smua1 = smu2657a.commands.smu["a"] smua2 = smu26xx.commands.smu["a"] 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..00c68996 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 @@ -40,8 +41,8 @@ with DeviceManager() as DM: # Replace the SMU2636B class with the instrument you are using for this test. - smu2657a: SMU2657A = DM.add_smu(SMU1_ID) # pyright: ignore[reportAssignmentType] - smu26xx: SMU2636B = DM.add_smu(SMU2_ID) # pyright: ignore[reportAssignmentType] + smu2657a: SMU2657A = DM.add_smu(SMU1_ID) + smu26xx: SMU2636B = DM.add_smu(SMU2_ID) smua1 = smu2657a.commands.smu["a"] smua2 = smu26xx.commands.smu["a"] 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 20b59f0a..e34e976f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,7 +87,7 @@ requests = ">=2.28.1" tomli = ">=2.0.1" tomli-w = ">=1.0.0" traceback-with-variables = ">=2.0.4" -typing-extensions = ">=4.4.0" +typing-extensions = ">=4.10.0" urllib3 = ">=2.0" zeroconf = ">=0.54.0" @@ -101,11 +101,11 @@ graphviz = ">=0.20.1" http-server-mock = ">=1.7" myst-parser = ">=0.19.1" pip = ">=22.0" -poetry = ">=1.5.1" +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.355" # 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.4" # Update this by running scripts/update_development_dependencies.py safety = ">=2.1.1" sphinx-autoapi = ">=2.0.0" sphinx-copybutton = ">=0.5.1" @@ -423,8 +423,8 @@ commands = !tests: pyright . !tests: pyright --verifytypes tm_devices --ignoreexternal !tests: pyroma . - !tests: poetry build - !tests: twine check --strict dist/* + !tests: poetry build --output=dist_{envname} + !tests: twine check --strict dist_{envname}/* !tests: pre-commit run --all-files --show-diff-on-failure pytest -vv -k "not test_docs" --showlocals --cov --junitxml={tox_root}/.results_{envname}/results.xml --cov-report=term --cov-report=xml:{tox_root}/.coverage_{envname}.xml --cov-report=html:{tox_root}/.results_{envname}/html --self-contained-html --html={tox_root}/.results_{envname}/results.html 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/__init__.py b/src/tm_devices/commands/_1l5u97_mdomsodpo/__init__.py deleted file mode 100644 index e69de29b..00000000 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