Clean up a bunch of unused variables

This commit is contained in:
Ebag333
2017-02-09 00:22:14 -08:00
parent f61aeb8285
commit f2c84692a9
9 changed files with 5 additions and 18 deletions

View File

@@ -179,7 +179,7 @@ class Effect(EqBase):
t = t if isinstance(t, tuple) or t is None else (t,)
self.__type = t
except (ImportError, AttributeError) as e:
except (ImportError, AttributeError):
self.__handler = effectDummy
self.__runTime = "normal"
self.__activeByDefault = True

View File

@@ -144,10 +144,8 @@ class PFListPane(wx.ScrolledWindow):
elif doFocus:
self.SetFocus()
clientW, clientH = self.GetSize()
for i in xrange(len(self._wList)):
iwidth, iheight = self._wList[i].GetSize()
itemX, itemY = self._wList[i].GetPosition()
self._wList[i].SetSize((cwidth, iheight))
if doRefresh is True:
self._wList[i].Refresh()

View File

@@ -50,7 +50,6 @@ class AmountChanger(wx.Dialog):
self.button.Bind(wx.EVT_BUTTON, self.change)
def change(self, event):
sFit = Fit.getInstance()
if self.input.GetLineText(0).strip() == '':
event.Skip()
return

View File

@@ -681,7 +681,6 @@ class FittingView(d.Display):
isize = 16
headerSize = max(isize, tdc.GetTextExtent("W")[0]) + padding * 2
maxWidth = 0
maxRowHeight = isize
rows = 0
for st in self.mods:
@@ -775,8 +774,7 @@ class FittingView(d.Display):
bmp = col.bitmap
opts.m_labelBitmap = bmp
width = render.DrawHeaderButton(self, mdc, (cx, padding, columnsWidths[i], headerSize), wx.CONTROL_CURRENT,
sortArrow=wx.HDR_SORT_ICON_NONE, params=opts)
render.DrawHeaderButton(self, mdc, (cx, padding, columnsWidths[i], headerSize), wx.CONTROL_CURRENT, sortArrow=wx.HDR_SORT_ICON_NONE, params=opts)
cx += columnsWidths[i]

View File

@@ -628,9 +628,9 @@ class APIView(wx.Panel):
try:
activeChar = self.charEditor.entityEditor.getActiveEntity()
list = sChar.apiCharList(activeChar.ID, self.inputID.GetLineText(0), self.inputKey.GetLineText(0))
except AuthenticationError, e:
except AuthenticationError:
self.stStatus.SetLabel("Authentication failure. Please check keyID and vCode combination.")
except TimeoutError, e:
except TimeoutError:
self.stStatus.SetLabel("Request timed out. Please check network connectivity and/or proxy settings.")
except Exception, e:
self.stStatus.SetLabel("Error:\n%s" % e.message)

View File

@@ -1123,8 +1123,6 @@ class PFTabsContainer(wx.Panel):
else:
mdc = wx.BufferedPaintDC(self)
selected = 0
if 'wxMac' in wx.PlatformInfo and wx.VERSION < (3, 0):
color = wx.Colour(0, 0, 0)
brush = wx.Brush(color)
@@ -1260,7 +1258,7 @@ class PFTabsContainer(wx.Panel):
if self.tabMinWidth < 1:
self.tabMinWidth = 1
for tab in self.tabs:
w, h = tab.GetSize()
tab.GetSize()
tab.SetSize((self.tabMinWidth, self.height))
if self.GetTabsCount() > 0:

View File

@@ -323,8 +323,6 @@ class PyGauge(wx.PyWindow):
# time on them if not needed. See GH issue #282
pv = value
xv = 1
transition = 0
if pv <= 100:
xv = pv / 100

View File

@@ -137,7 +137,6 @@ class PFToolbar(object):
return doRefresh
def MouseClick(self, event):
mx, my = event.GetPosition()
bx = self.toolbarX
for button in self.buttons:
if not button.IsVisible():

View File

@@ -629,7 +629,6 @@ class ShipBrowser(wx.Panel):
event.Skip()
def SizeRefreshList(self, event):
ewidth, eheight = event.GetSize()
self.Layout()
self.lpane.Layout()
self.lpane.RefreshList(True)
@@ -1871,8 +1870,6 @@ class FitItem(SFItem.SFBrowserItem):
mdc.DrawBitmap(self.shipBmp, self.shipBmpx, self.shipBmpy, 0)
shipName, shipTrait, fittings, booster, timestamp = self.shipFittingInfo
mdc.SetFont(self.fontNormal)
fitDate = time.localtime(self.timestamp)