Some tox fixes

This commit is contained in:
blitzmann
2018-09-15 19:25:37 -04:00
parent b08406b7d6
commit 621672bf34
96 changed files with 90 additions and 334 deletions

View File

@@ -28,6 +28,7 @@ from gui.utils.staticHelpers import DragDropHelper
from service.fit import Fit
import gui.fitCommands as cmd
class BoosterViewDrop(wx.DropTarget):
def __init__(self, dropFn, *args, **kwargs):
super(BoosterViewDrop, self).__init__(*args, **kwargs)

View File

@@ -32,6 +32,7 @@ from gui.utils.staticHelpers import DragDropHelper
from service.fit import Fit
import gui.fitCommands as cmd
class DummyItem(object):
def __init__(self, txt):
self.name = txt
@@ -100,7 +101,6 @@ class CommandView(d.Display):
keycode = event.GetKeyCode()
if keycode == wx.WXK_DELETE or keycode == wx.WXK_NUMPAD_DELETE:
fitID = self.mainFrame.getActiveFit()
sFit = Fit.getInstance()
row = self.GetFirstSelected()
if row != -1:
self.mainFrame.command.Submit(cmd.GuiRemoveCommandCommand(fitID, self.get(row).ID))
@@ -218,7 +218,6 @@ class CommandView(d.Display):
col = self.getColumn(event.Position)
if col != self.getColIndex(State):
fitID = self.mainFrame.getActiveFit()
sFit = Fit.getInstance()
thing = self.get(row)
if thing: # thing doesn't exist if it's the dummy value
self.mainFrame.command.Submit(cmd.GuiRemoveCommandCommand(fitID, thing.ID))

View File

@@ -31,6 +31,7 @@ from service.fit import Fit
from service.market import Market
import gui.fitCommands as cmd
class DroneViewDrop(wx.DropTarget):
def __init__(self, dropFn, *args, **kwargs):
super(DroneViewDrop, self).__init__(*args, **kwargs)

View File

@@ -30,6 +30,7 @@ from service.fit import Fit
from service.market import Market
import gui.fitCommands as cmd
class ImplantView(wx.Panel):
def __init__(self, parent):
wx.Panel.__init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition, style=wx.TAB_TRAVERSAL)

View File

@@ -322,7 +322,6 @@ class ProjectedView(d.Display):
col = self.getColumn(event.Position)
if col != self.getColIndex(State):
fitID = self.mainFrame.getActiveFit()
sFit = Fit.getInstance()
thing = self.get(row)
if thing: # thing doesn't exist if it's the dummy value
self.mainFrame.command.Submit(cmd.GuiRemoveProjectedCommand(fitID, thing))