From e666aa9a3f3e25cb36cc813388f715dcd3278b84 Mon Sep 17 00:00:00 2001 From: Mike Wagoner <119902170+michaelwagoner@users.noreply.github.com> Date: Wed, 7 Feb 2024 16:04:28 -0800 Subject: [PATCH] Apply suggestions from code review style: add more info to changelog, remove unnecessary whitespace. Co-authored-by: Nicholas Felt Signed-off-by: Mike Wagoner <119902170+michaelwagoner@users.noreply.github.com> --- CHANGELOG.md | 2 +- src/tm_devices/drivers/pi/pi_device.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b6a9913..f34c118c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,7 +33,7 @@ Things to be included in the next release go here. ### Fixed - Fixed the code that detects VISA resource expressions to be able to detect SOCKET resource expressions properly. -- Fixed PI device close method to catch VisaIOErrors and throw a warning closing a PI device connection. +- Fixed PI device close method to catch VisaIOErrors and throw a warning, rather than an exception, when closing a PI device connection. ______________________________________________________________________ diff --git a/src/tm_devices/drivers/pi/pi_device.py b/src/tm_devices/drivers/pi/pi_device.py index 68205736..c1c113ef 100644 --- a/src/tm_devices/drivers/pi/pi_device.py +++ b/src/tm_devices/drivers/pi/pi_device.py @@ -822,7 +822,7 @@ def _close(self) -> None: self._visa_resource.close() except VisaIOError as error: warnings.warn( - f"Error encountered while closing the visa resource: \n {error}", stacklevel=2 + f"Error encountered while closing the visa resource:\n{error}", stacklevel=2 ) self._visa_resource = None # pyright: ignore[reportAttributeAccessIssue] self._is_open = False