Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flake8v4 #140

Merged
merged 6 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/diffpy/pdfgui/gui/aboutdialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#
# PDFgui by DANSE Diffraction group
# Simon J. L. Billinge
# (c) 2006 trustees of the Michigan State University.
# (c) 2024 trustees of the Columbia University in the City
# (c) 2006 Trustees of the Michigan State University.
# (c) 2024 Trustees of the Columbia University in the City
# of New York
# All rights reserved.
#
Expand Down
2 changes: 1 addition & 1 deletion src/diffpy/pdfgui/gui/errorwrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def _f(*args, **kwargs):
return rvpass

# Everything else
except:
except Exception:
if pdfguiglobals.dbopts.pythondebugger:
import pdb

Expand Down
10 changes: 5 additions & 5 deletions src/diffpy/pdfgui/gui/fittree.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ def AddFit(self, fitname="Fit 1", cdata=None, paste=False):
cdata = self.control.paste(cdata, None, fitname, pos)
self.SetControlData(newfit, cdata)
return newfit
except:
except Exception:
self.Delete(newfit)
raise
return
Expand Down Expand Up @@ -427,7 +427,7 @@ def AddPhase(self, node, label, insertafter=None, filename=None, makedata=True,
elif cdata is not None:
self.control.paste(cdata, pdata, label, pos)
return newphase
except:
except Exception:
self.Delete(newphase)
raise
return
Expand Down Expand Up @@ -492,7 +492,7 @@ def AddDataSet(self, node, label, insertafter=None, filename=None, makedata=True
elif cdata is not None:
self.control.paste(cdata, pdata, label, pos)
return newset
except:
except Exception:
self.Delete(newset)
raise
return
Expand Down Expand Up @@ -553,7 +553,7 @@ def AddCalc(self, node, label, insertafter=None, makedata=True, cdata=None):
elif cdata is not None:
self.control.paste(cdata, pdata, label, pos)
return newcalc
except:
except Exception:
self.Delete(newcalc)
raise
return
Expand Down Expand Up @@ -611,7 +611,7 @@ def GetClipboard(self):
if cdatabytes[:16] == "pdfgui_cliboard=".encode():
cdatabytes = cdatabytes[16:]
cdata = pickle_loads(cdatabytes)
except:
except Exception:
pass
return cdata

Expand Down
2 changes: 1 addition & 1 deletion src/diffpy/pdfgui/gui/phaseconfigurepanel.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ def applyTextCtrlChange(self, id, value):

return value

except:
except Exception:
return None

def applyCellChange(self, i, j, value):
Expand Down
2 changes: 1 addition & 1 deletion src/diffpy/pdfgui/gui/phasepanelutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def canPasteIntoCells(panel):
# Strip any trailing tabs
rowlist = [r.rstrip("\t") for r in rowlist]
celllist = [r.split("\t") for r in rowlist]
except:
except wx.PyDeadObjectError:
return False

if len(celllist) == 0:
Expand Down
3 changes: 1 addition & 2 deletions src/diffpy/pdfgui/gui/plotpanel.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

# generated by wxGlade 0.9.3 on Fri Jul 19 16:05:24 2019

import sys

import wx

Expand Down Expand Up @@ -167,7 +166,7 @@ def _represent(mixedNames):
xvals = _represent(xdata)
try:
xvals.remove("rw")
except:
except ValueError:
pass
numericStringSort(xvals)

Expand Down
Loading