Skip to content

Commit

Permalink
gh-actions(deps): Bump the gh-actions-dependencies group with 1 update (
Browse files Browse the repository at this point in the history
tektronix#130)

* gh-actions(deps): Bump the gh-actions-dependencies group with 1 update

Bumps the gh-actions-dependencies group with 1 update: [actions/dependency-review-action](https://github.com/actions/dependency-review-action).


Updates `actions/dependency-review-action` from 3 to 4
- [Release notes](https://github.com/actions/dependency-review-action/releases)
- [Commits](actions/dependency-review-action@v3...v4)

---
updated-dependencies:
- dependency-name: actions/dependency-review-action
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: gh-actions-dependencies
...

Signed-off-by: dependabot[bot] <[email protected]>

* style: Update pyright linting control comments to use the newly added error codes.

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nicholas Felt <[email protected]>
Signed-off-by: v12ganesh [email protected]
  • Loading branch information
dependabot[bot] and nfelt14 authored Jan 22, 2024
1 parent 4f98a5b commit b004c3c
Show file tree
Hide file tree
Showing 30 changed files with 36 additions and 36 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/dependency-review-action@v3
- uses: actions/dependency-review-action@v4
with:
fail-on-severity: low
comment-summary-in-pr: on-failure
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ repos:
always_run: true
args: [., --min=10]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.13
rev: v0.1.14
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
4 changes: 2 additions & 2 deletions examples/miscellaneous/custom_device_driver_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,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[reportGeneralTypeIssues]
mso5: MSO5 = device_manager.add_scope("192.168.0.1") # pyright: ignore[reportAssignmentType]
# Add the custom scope
custom_scope: CustomScope = device_manager.add_scope("192.168.0.2") # pyright: ignore[reportGeneralTypeIssues]
custom_scope: CustomScope = device_manager.add_scope("192.168.0.2") # pyright: ignore[reportAssignmentType]

# Custom drivers inherit all methods
custom_scope.expect_esr(0) # check for no errors
Expand Down
4 changes: 2 additions & 2 deletions examples/miscellaneous/disable_command_verification.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

with DeviceManager(verbose=True) as dm:
# Add some devices
scope: MSO5 = dm.add_scope("192.168.0.1") # pyright: ignore[reportGeneralTypeIssues]
smu: SMU2601B = dm.add_smu("192.168.0.2") # pyright: ignore[reportGeneralTypeIssues]
scope: MSO5 = dm.add_scope("192.168.0.1") # pyright: ignore[reportAssignmentType]
smu: SMU2601B = dm.add_smu("192.168.0.2") # pyright: ignore[reportAssignmentType]

#
# Set some values and use verification to verify they were set properly.
Expand Down
2 changes: 1 addition & 1 deletion examples/scopes/tekscope/basic_save_recall.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

with DeviceManager(verbose=True) as dm:
# Get a scope
scope: MSO6B = dm.add_scope("192.168.1.177") # pyright: ignore[reportGeneralTypeIssues]
scope: MSO6B = dm.add_scope("192.168.1.177") # pyright: ignore[reportAssignmentType]

# Send some commands
scope.add_new_math("MATH1", "CH1") # add MATH1 to CH1
Expand Down
2 changes: 1 addition & 1 deletion examples/scopes/tekscope/generate_internal_afg_signal.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

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[reportGeneralTypeIssues]
scope: MSO5 = dm.add_scope("192.168.1.102") # pyright: ignore[reportAssignmentType]

# Generate the signal
scope.commands.afg.frequency.write(10e6) # set frequency
Expand Down
2 changes: 1 addition & 1 deletion examples/scopes/tekscope/get_acquisition_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,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[reportGeneralTypeIssues]
scope: MSO6B = device_manager.add_scope("127.0.0.1") # pyright: ignore[reportAssignmentType]

# Turn on channel 1
scope.commands.display.waveview1.ch[1].state.write("ON")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,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[reportGeneralTypeIssues]
scope: MSO70KDX = device_manager.add_scope("127.0.0.1") # pyright: ignore[reportAssignmentType]

# Starting DPOJET
scope.commands.dpojet.activate.write()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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[reportGeneralTypeIssues]
smu2400: SMU2450 = devmgr.add_smu("192.168.0.1", alias="my2450") # pyright: ignore[reportAssignmentType]
smu2400.enable_verification = False

# Capture the path to the script file and load it to working memory.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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[reportGeneralTypeIssues]
inst: SMU2450 = device_manager.add_smu("192.168.1.4", alias="my2450") # pyright: ignore[reportAssignmentType]

# Reset the instrument, which also clears the buffer.
inst.commands.reset()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from tm_devices.drivers import SMU2450

with DeviceManager() as device_manager:
smu2450: SMU2450 = device_manager.add_smu( # pyright: ignore[reportGeneralTypeIssues]
smu2450: SMU2450 = device_manager.add_smu( # pyright: ignore[reportAssignmentType]
"USB0::0x05E6::0x2450::01419969::INSTR", alias="my2450"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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[reportGeneralTypeIssues]
inst: SMU2450 = device_manager.add_smu("192.168.4.74", alias="my2450") # pyright: ignore[reportAssignmentType]

# Configure the Simple Loop trigger model template to make 100 readings.
inst.commands.trigger.model.load_simple_loop(100)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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[reportGeneralTypeIssues]
inst: SMU2450 = device_manager.add_smu("192.168.4.74", alias="my2450") # pyright: ignore[reportAssignmentType]

# Clear the buffer.
inst.commands.buffer_var["defbuffer1"].clear()
Expand Down
2 changes: 1 addition & 1 deletion examples/source_measure_units/2400/smu_2450_solar_cell.py
Original file line number Diff line number Diff line change
Expand Up @@ -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[reportGeneralTypeIssues]
inst: SMU2450 = device_manager.add_smu("192.168.4.74", alias="my2450") # pyright: ignore[reportAssignmentType]

# Define the number of points in the sweep.
POINTS = 56
Expand Down
2 changes: 1 addition & 1 deletion examples/source_measure_units/2400/smu_2460_pulse_train.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
LIMIT = 7

with DeviceManager(verbose=True) as dm:
inst: SMU2460 = dm.add_smu(RESOURCE_ID) # pyright: ignore[reportGeneralTypeIssues]
inst: SMU2460 = dm.add_smu(RESOURCE_ID) # pyright: ignore[reportAssignmentType]

# Set to current source and set up source config list
inst.commands.smu.source.configlist.create("OutputList")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
S_DELAY = 0.05

with DeviceManager(verbose=False) as dm:
inst: SMU2460 = dm.add_smu(RESOURCE_ID) # pyright: ignore[reportGeneralTypeIssues]
inst: SMU2460 = dm.add_smu(RESOURCE_ID) # pyright: ignore[reportAssignmentType]

# Reset the Model 2460 and clear its buffer.
inst.commands.reset()
Expand Down
2 changes: 1 addition & 1 deletion examples/source_measure_units/2400/smu_2461_1kw_pulsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,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[reportGeneralTypeIssues]
smu2461: SMU2461 = device_manager.add_smu("TCPIP::0.0.0.0::inst0::INSTR", alias="my2461") # pyright: ignore[reportAssignmentType]

# Reset the instrument
smu2461.commands.reset()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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[reportGeneralTypeIssues]
smu2461: SMU2461 = device_manager.add_smu( # pyright: ignore[reportAssignmentType]
"TCPIP::0.0.0.0::inst0::INSTR", alias="my2461"
) # 192.168.0.2

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from tm_devices.drivers import SMU2470

with DeviceManager(verbose=False) as device_manager:
smu2470: SMU2470 = device_manager.add_smu( # pyright: ignore[reportGeneralTypeIssues]
smu2470: SMU2470 = device_manager.add_smu( # pyright: ignore[reportAssignmentType]
"TCPIP::0.0.0.0::inst0::INSTR", alias="my2470"
) # 192.168.0.2

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
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[reportGeneralTypeIssues]
smu2470: SMU2470 = device_manager.add_smu("TCPIP::0.0.0.0::inst0::INSTR", alias="my2470") # pyright: ignore[reportAssignmentType]

# Reset the instrument, which also clears the buffer.
smu2470.commands.reset()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

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[reportGeneralTypeIssues]
smu: SMU2601B = device_manager.add_smu("192.168.0.1") # pyright: ignore[reportAssignmentType]

# Create a buffer
BUFFER_NAME = "mybuffer"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,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[reportGeneralTypeIssues]
inst_driver: SMU2602B = DM.add_smu(RESOURCE_ID) # pyright: ignore[reportAssignmentType]
waveform_sweep(inst_driver)
2 changes: 1 addition & 1 deletion examples/source_measure_units/2600/smu_2600_bjt_slow.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,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[reportGeneralTypeIssues]
smu_driver: SMU2602B = DM.add_smu(RESOURCE_ID) # pyright: ignore[reportAssignmentType]

bjt_slow(smu_driver)
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,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[reportGeneralTypeIssues]
smu_driver: SMU2602B = DM.add_smu(RESOURCE_ID) # pyright: ignore[reportAssignmentType]

# Save settings in temporary variables so they can be restored after completion.
s_func = smu_driver.commands.smu["a"].source.func
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def capture_pulse_v(inst: SMU2651A) -> None:

# RUN TEST
with DeviceManager() as DM:
inst_driver: SMU2651A = DM.add_smu(RESOURCE_ID) # pyright: ignore[reportGeneralTypeIssues]
inst_driver: SMU2651A = DM.add_smu(RESOURCE_ID) # pyright: ignore[reportAssignmentType]

capture_pulse_i(inst_driver)
capture_pulse_v(inst_driver)
2 changes: 1 addition & 1 deletion examples/source_measure_units/2600/smu_2657_dioderl_swp.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,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[reportGeneralTypeIssues]
smu2657a: SMU2657A = dev_man.add_smu( # pyright: ignore[reportAssignmentType]
address="TCPIP::0.0.0.0::inst0::INSTR", alias="my2657a"
) # 192.168.0.2
# Reset and initialize instrument
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,5 @@ def capacitor_leakage(inst: SMU2657A) -> None:


with DeviceManager() as DM:
smu_driver: SMU2657A = DM.add_smu(RESOURCE_ID) # pyright: ignore[reportGeneralTypeIssues]
smu_driver: SMU2657A = DM.add_smu(RESOURCE_ID) # pyright: ignore[reportAssignmentType]
capacitor_leakage(smu_driver)
4 changes: 2 additions & 2 deletions examples/source_measure_units/2600/smu_2657a_mosfet_bvdss.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,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[reportGeneralTypeIssues]
smu26xx: SMU2636B = DM.add_smu(SMU2_ID) # pyright: ignore[reportGeneralTypeIssues]
smu2657a: SMU2657A = DM.add_smu(SMU1_ID) # pyright: ignore[reportAssignmentType]
smu26xx: SMU2636B = DM.add_smu(SMU2_ID) # pyright: ignore[reportAssignmentType]

smua1 = smu2657a.commands.smu["a"]
smua2 = smu26xx.commands.smu["a"]
Expand Down
4 changes: 2 additions & 2 deletions examples/source_measure_units/2600/smu_2657a_mosfet_idss.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,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[reportGeneralTypeIssues]
smu26xx: SMU2636B = DM.add_smu(SMU2_ID) # pyright: ignore[reportGeneralTypeIssues]
smu2657a: SMU2657A = DM.add_smu(SMU1_ID) # pyright: ignore[reportAssignmentType]
smu26xx: SMU2636B = DM.add_smu(SMU2_ID) # pyright: ignore[reportAssignmentType]

smua1 = smu2657a.commands.smu["a"]
smua2 = smu26xx.commands.smu["a"]
Expand Down
6 changes: 3 additions & 3 deletions src/tm_devices/helpers/read_only_cached_property.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# TODO: Remove the pragmas and exception block when support for Python 3.8 is dropped
try: # pragma: py-lt-39
# pylint: disable=unsubscriptable-object,useless-suppression
class ReadOnlyCachedProperty(cached_property[_T]): # pyright: ignore[reportGeneralTypeIssues]
class ReadOnlyCachedProperty(cached_property[_T]): # pyright: ignore[reportRedeclaration]
"""An implementation of cached_property that is read-only.
Examples:
Expand All @@ -35,7 +35,7 @@ def __delete__(self, instance: object) -> None:
# Delete the attribute from the cache, ignoring KeyErrors since that just means the
# attribute already doesn't exist and therefore doesn't need to be deleted.
with contextlib.suppress(KeyError):
del cache[self.attrname] # pyright: ignore[reportGeneralTypeIssues]
del cache[self.attrname] # pyright: ignore[reportArgumentType]

except TypeError: # pragma: py-gte-39
# pylint: disable=unsubscriptable-object,useless-suppression
Expand Down Expand Up @@ -65,4 +65,4 @@ def __delete__(self, instance: object) -> None:
# Delete the attribute from the cache, ignoring KeyErrors since that just means the
# attribute already doesn't exist and therefore doesn't need to be deleted.
with contextlib.suppress(KeyError):
del cache[self.attrname] # pyright: ignore[reportGeneralTypeIssues]
del cache[self.attrname] # pyright: ignore[reportArgumentType]

0 comments on commit b004c3c

Please sign in to comment.