From 4974665a1e0f535ee9296b045ff79dd003629ef0 Mon Sep 17 00:00:00 2001 From: Jasper-Harvey0 Date: Thu, 22 Jan 2026 12:49:49 +1100 Subject: [PATCH 1/4] Fix formatting on lcr driver --- src/fixate/drivers/lcr/agilent_u1732c.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fixate/drivers/lcr/agilent_u1732c.py b/src/fixate/drivers/lcr/agilent_u1732c.py index 5608a9d..cecc47e 100644 --- a/src/fixate/drivers/lcr/agilent_u1732c.py +++ b/src/fixate/drivers/lcr/agilent_u1732c.py @@ -79,7 +79,8 @@ class AgilentU1732C(LCR): - REGEX_ID = "(Keysight|Agilent) Technologies,U1732C" # Regex allows multiple manufacturers + # Regex allows multiple manufacturers + REGEX_ID = "(Keysight|Agilent) Technologies,U1732C" INSTR_TYPE = "VISA" def __init__(self, instrument): From 570ad2057dfabbfdec1caf203b9acf9bb7f7bf2b Mon Sep 17 00:00:00 2001 From: Jasper-Harvey0 Date: Thu, 22 Jan 2026 12:52:18 +1100 Subject: [PATCH 2/4] Fix string formatting in fxconfig --- src/fixate/core/config_util.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/fixate/core/config_util.py b/src/fixate/core/config_util.py index d30f822..6e6f481 100644 --- a/src/fixate/core/config_util.py +++ b/src/fixate/core/config_util.py @@ -5,10 +5,11 @@ import copy from shutil import copy2 from pathlib import Path -from cmd2.ansi import style, Fg from fixate.drivers.pps.bk_178x import BK178X from pyvisa.errors import VisaIOError import fixate.config +from cmd2.string_utils import stylize +from cmd2.colors import Color """ fxconfig is a configuration utility that helps find connected instruments and add them to fixate's driver @@ -66,8 +67,6 @@ class FxConfigError(Exception): class FxConfigCmd(cmd2.Cmd): - prompt = "fx>" - def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.config_file_path = None @@ -78,6 +77,8 @@ def __init__(self, *args, **kwargs): self.complete_save = self.path_complete self.complete_open = self.path_complete + self.prompt = "fx>" + def postloop(self): """Print a new line so the shell prompt get printed on its own line after we exit""" self.poutput("") @@ -303,13 +304,13 @@ def _print_config_dict(self, config_dict): self.poutput("SERIAL || " + com_port + " || " + str(parameters)) def _test_print_error(self, name, msg): - self.poutput(style("ERROR: ", fg=Fg.RED), end="") - self.poutput(style(str(name), fg=Fg.CYAN), end="") + self.poutput(stylize("ERROR: ", style=f"bold {Color.RED}"), end="") + self.poutput(stylize(str(name), style=Color.CYAN), end="") self.poutput(f" - {msg}") def _test_print_ok(self, name, msg): - self.poutput(style("OK: ", fg=Fg.GREEN), end="") - self.poutput(style(str(name), fg=Fg.CYAN), end="") + self.poutput(stylize("OK: ", style=f"bold {Color.GREEN}"), end="") + self.poutput(stylize(str(name), style=Color.CYAN), end="") self.poutput(f" - {msg}") def _test_config_dict(self, config_dict): From a91f4da754a6f6c765ef00af60057b92d9d1f6ec Mon Sep 17 00:00:00 2001 From: Jasper-Harvey0 Date: Thu, 22 Jan 2026 12:55:29 +1100 Subject: [PATCH 3/4] Drop support from py38 to py311 --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index efd78a4..8b3d4bd 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py38,py39,py310,py311,py312,black,mypy +envlist = py312,py313,black,mypy isolated_build = True [testenv] From 5f0e979acd15a8d5d29a200a518d43649fabb5fe Mon Sep 17 00:00:00 2001 From: Jasper-Harvey0 Date: Thu, 22 Jan 2026 13:00:34 +1100 Subject: [PATCH 4/4] Drop support from py38 to py311 --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f09b280..2a6b247 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,7 +17,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.12", "3.13"] steps: - uses: actions/checkout@v3