From ff80e442e3ce0194fdd9056ab532ba5f33ca4012 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 12 Dec 2025 10:23:09 +0000 Subject: [PATCH 1/3] Initial plan From 8fa24f5c8ccbef6cc7d45ed3f72fdf09dc250da6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 12 Dec 2025 10:27:42 +0000 Subject: [PATCH 2/3] Fix bare except clauses with specific exception types Co-authored-by: michael-petersen <19195541+michael-petersen@users.noreply.github.com> --- exptool/analysis/pattern.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/exptool/analysis/pattern.py b/exptool/analysis/pattern.py index 78247d3..ff855fe 100644 --- a/exptool/analysis/pattern.py +++ b/exptool/analysis/pattern.py @@ -299,7 +299,7 @@ def __init__(self,**kwargs): self.read_bar(kwargs['file']) print('pattern.BarDetermine: BarInstance sucessfully read.') - except: + except (FileNotFoundError, IOError, ValueError): print('pattern.BarDetermine: no compatible bar file found.') @@ -559,7 +559,7 @@ def read_bar(self,infile): pos.append(q[1]) try: deriv.append(q[2]) - except: + except IndexError: pass self.time = np.array(time) @@ -659,7 +659,7 @@ def find_barpattern(intime, BarInstance, smth_order=2): # Get the derivative (bar pattern speed) at the closest time barpattern[indx] = BarInstance.deriv[best_time] - except: + except TypeError: # Handle the case where intime is a single value best_time = abs(intime - BarInstance.time).argmin() From 65efe5a20dba7fb064c47450eb40e143398376d6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 12 Dec 2025 10:28:52 +0000 Subject: [PATCH 3/3] Fix typo: sucessfully -> successfully Co-authored-by: michael-petersen <19195541+michael-petersen@users.noreply.github.com> --- exptool/analysis/pattern.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exptool/analysis/pattern.py b/exptool/analysis/pattern.py index ff855fe..c479afa 100644 --- a/exptool/analysis/pattern.py +++ b/exptool/analysis/pattern.py @@ -297,7 +297,7 @@ def __init__(self,**kwargs): try: # check to see if bar file has already been created self.read_bar(kwargs['file']) - print('pattern.BarDetermine: BarInstance sucessfully read.') + print('pattern.BarDetermine: BarInstance successfully read.') except (FileNotFoundError, IOError, ValueError): print('pattern.BarDetermine: no compatible bar file found.')