From 99d6c657264d21028db08a19183e5f8ec18a4e0a Mon Sep 17 00:00:00 2001 From: SAY-5 Date: Mon, 11 May 2026 23:30:19 -0700 Subject: [PATCH] fix(pcan): swap SetValue and GetErrorText docstrings The docstrings for SetValue and GetErrorText in pcan/basic.py were swapped: SetValue described returning an error text and GetErrorText described configuring a channel value. Swap them so each docstring matches its function. Fixes #2047 --- can/interfaces/pcan/basic.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/can/interfaces/pcan/basic.py b/can/interfaces/pcan/basic.py index 4d175c645..3654699c5 100644 --- a/can/interfaces/pcan/basic.py +++ b/can/interfaces/pcan/basic.py @@ -990,12 +990,10 @@ def GetValue(self, Channel, Parameter): logger.error("Exception on PCANBasic.GetValue") raise - # Returns a descriptive text of a given TPCANStatus - # error code, in any desired language + # Configures or sets a PCAN Channel value # def SetValue(self, Channel, Parameter, Buffer): - """Returns a descriptive text of a given TPCANStatus error - code, in any desired language + """Configures or sets a PCAN Channel value Remarks: Parameters can be present or not according with the kind @@ -1036,7 +1034,8 @@ def SetValue(self, Channel, Parameter, Buffer): raise def GetErrorText(self, Error, Language=0): - """Configures or sets a PCAN Channel value + """Returns a descriptive text of a given TPCANStatus error + code, in any desired language Remarks: