|
28 | 28 |
|
29 | 29 | if TYPE_CHECKING: |
30 | 30 | from collections.abc import Callable, Sequence |
| 31 | + from typing import assert_never |
31 | 32 |
|
32 | 33 | from typing_extensions import Unpack |
33 | 34 |
|
@@ -243,6 +244,13 @@ def _build_1d_script(self, config: _FastSweepConfig) -> list[str]: |
243 | 244 | meas, source, func, sense_mode = "v", "i", "0", "0" |
244 | 245 | case "VIfourprobe": |
245 | 246 | meas, source, func, sense_mode = "v", "i", "0", "1" |
| 247 | + case _: |
| 248 | + if TYPE_CHECKING: |
| 249 | + assert_never() |
| 250 | + raise ValueError( |
| 251 | + f"Unsupported fast sweep mode {config.mode!r}. " |
| 252 | + "Expected one of 'IV', 'VI', 'VIfourprobe'." |
| 253 | + ) |
246 | 254 |
|
247 | 255 | script = [ |
248 | 256 | # Configure measurement channel |
@@ -305,6 +313,13 @@ def _build_2d_script(self, config: _FastSweepConfig) -> list[str]: |
305 | 313 | case "VIfourprobe": |
306 | 314 | meas, source, func, sense_mode = "v", "i", "0", "1" |
307 | 315 | outer_source, outer_func = "i", "0" |
| 316 | + case _: |
| 317 | + if TYPE_CHECKING: |
| 318 | + assert_never() |
| 319 | + raise ValueError( |
| 320 | + f"Unsupported fast sweep mode {config.mode!r}. " |
| 321 | + "Expected one of 'IV', 'VI', 'VIfourprobe'." |
| 322 | + ) |
308 | 323 |
|
309 | 324 | script = [ |
310 | 325 | # Configure measurement channel |
|
0 commit comments