Revert commit 7865219164 This causes too much grief as we are getting a lot of default values from the database. These *SHOULD* be defined, but will have to be done later.

This commit is contained in:
Ebag333
2017-02-09 09:36:16 -08:00
parent dd9924a7a7
commit 64070a0798
22 changed files with 10 additions and 84 deletions

View File

@@ -74,9 +74,6 @@ commandFits_table = Table("commandFits", saveddata_meta,
class ProjectedFit(object):
victim_fit = None
victimID = None
def __init__(self, sourceID, source_fit, amount=1, active=True):
self.sourceID = sourceID
self.source_fit = source_fit
@@ -108,9 +105,6 @@ class ProjectedFit(object):
class CommandFit(object):
boosted_fit = None
boostedID = None
def __init__(self, boosterID, booster_fit, active=True):
self.boosterID = boosterID
self.booster_fit = booster_fit

View File

@@ -242,8 +242,6 @@ class HandledProjectedDroneList(HandledDroneCargoList):
class HandledItem(object):
itemModifiedAttributes = None
def preAssignItemAttr(self, *args, **kwargs):
self.itemModifiedAttributes.preAssign(*args, **kwargs)
@@ -261,8 +259,6 @@ class HandledItem(object):
class HandledCharge(object):
chargeModifiedAttributes = None
def preAssignChargeAttr(self, *args, **kwargs):
self.chargeModifiedAttributes.preAssign(*args, **kwargs)

View File

@@ -46,7 +46,7 @@ class Effect(EqBase):
nameFilter = re.compile("[^A-Za-z0-9]")
def __init__(self):
self.name = None
pass
@reconstructor
def init(self):
@@ -204,16 +204,6 @@ def effectDummy(*args, **kwargs):
class Item(EqBase):
typeID = None
name = None
group = None
effects = None
raceID = None
factionID = None
category = None
ID = None
__attributes = None
MOVE_ATTRS = (4, # Mass
38, # Capacity
161) # Volume
@@ -451,21 +441,20 @@ class EffectInfo(EqBase):
class AttributeInfo(EqBase):
name = None
pass
class Attribute(EqBase):
value = None
attributeID = None
pass
class Category(EqBase):
name = None
pass
class AlphaClone(EqBase):
def __init__(self):
self.skills = None
pass
@reconstructor
def init(self):
@@ -486,8 +475,7 @@ class AlphaCloneSkill(EqBase):
class Group(EqBase):
category = None
name = None
pass
class Icon(EqBase):
@@ -496,9 +484,7 @@ class Icon(EqBase):
class MarketGroup(EqBase):
def __init__(self):
self.parent = None
self.name = None
self.ID = None
pass
def __repr__(self):
return u"MarketGroup(ID={}, name={}, parent={}) at {}".format(
@@ -512,7 +498,7 @@ class MetaGroup(EqBase):
class MetaType(EqBase):
def __init__(self):
self.parent = None
pass
pass

View File

@@ -31,13 +31,9 @@ logger = logging.getLogger(__name__)
class Character(object):
ownerID = None
savedName = None
ID = None
__itemList = None
__itemIDMap = None
__itemNameMap = None
apiID = None
@classmethod
def getSkillList(cls):

View File

@@ -24,9 +24,6 @@ from sqlalchemy.orm import reconstructor
class CrestChar(object):
name = None
ID = None
def __init__(self, id, name, refresh_token=None):
self.ID = id
self.name = name

View File

@@ -21,9 +21,6 @@ import re
class DamagePattern(object):
name = None
ID = None
Name = None
DAMAGE_TYPES = ("em", "thermal", "kinetic", "explosive")
def __init__(self, emAmount=25, thermalAmount=25, kineticAmount=25, explosiveAmount=25):

View File

@@ -33,7 +33,6 @@ logger = logging.getLogger(__name__)
class Fighter(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut):
DAMAGE_TYPES = ("em", "kinetic", "explosive", "thermal")
DAMAGE_TYPES2 = ("EM", "Kin", "Exp", "Therm")
owner = None
def __init__(self, item):
"""Initialize a fighter from the program"""

View File

@@ -27,7 +27,6 @@ logger = logging.getLogger(__name__)
class FighterAbility(object):
DAMAGE_TYPES = ("em", "kinetic", "explosive", "thermal")
DAMAGE_TYPES2 = ("EM", "Kin", "Exp", "Therm")
fighter = None
# We aren't able to get data on the charges that can be stored with fighters. So we hardcode that data here, keyed
# with the fighter squadron role

View File

@@ -49,18 +49,6 @@ class ImplantLocation(Enum):
class Fit(object):
"""Represents a fitting, with modules, ship, implants, etc."""
name = None
shipID = None
booster = None
ownerID = None
__projectedFits = None
__commandFits = None
projectedOnto = None
boostedOnto = None
ID = None
owner = None
notes = None
PEAK_RECHARGE = 0.25
def __init__(self, ship=None, name=""):

View File

@@ -29,8 +29,6 @@ logger = logging.getLogger(__name__)
class Implant(HandledItem, ItemAttrShortcut):
ID = None
def __init__(self, item):
self.__item = item

View File

@@ -71,8 +71,6 @@ class Module(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut):
def __init__(self, item):
"""Initialize a module from the program"""
self.owner = None
self.dummySlot = None
self.__item = item
if item is not None and self.isInvalid:

View File

@@ -28,8 +28,6 @@ logger = logging.getLogger(__name__)
class Override(EqBase):
itemID = None
def __init__(self, item, attr, value):
self.itemID = item.ID
self.__item = item

View File

@@ -22,8 +22,6 @@ import re
class TargetResists(object):
# also determined import/export order - VERY IMPORTANT
name = None
ID = None
DAMAGE_TYPES = ("em", "thermal", "kinetic", "explosive")
def __init__(self, emAmount=0, thermalAmount=0, kineticAmount=0, explosiveAmount=0):

View File

@@ -25,9 +25,6 @@ from sqlalchemy.orm import validates
class User(object):
username = None
ID = None
def __init__(self, username, password=None, admin=False):
self.username = username
if password is not None:

View File

@@ -30,9 +30,6 @@ class PriceViewFull(StatsView):
def __init__(self, parent):
StatsView.__init__(self)
self.labelPriceTotal = None
self.labelPriceFittings = None
self.labelPriceShip = None
self.parent = parent
self._cachedShip = 0
self._cachedFittings = 0

View File

@@ -35,8 +35,6 @@ import gui.builtinViews.emptyView
from gui.utils.exportHtml import exportHtml
from logging import getLogger
from gui.chromeTabs import EVT_NOTEBOOK_PAGE_CHANGED
from service.fit import Fit
from service.market import Market
@@ -162,7 +160,7 @@ class FittingView(d.Display):
self.Bind(wx.EVT_SHOW, self.OnShow)
self.Bind(wx.EVT_MOTION, self.OnMouseMove)
self.Bind(wx.EVT_LEAVE_WINDOW, self.OnLeaveWindow)
self.parent.Bind(EVT_NOTEBOOK_PAGE_CHANGED, self.pageChanged)
self.parent.Bind(gui.chromeTabs.EVT_NOTEBOOK_PAGE_CHANGED, self.pageChanged)
def OnLeaveWindow(self, event):
self.SetToolTip(None)
@@ -211,7 +209,7 @@ class FittingView(d.Display):
wx.PostEvent(self.mainFrame, gui.shipBrowser.FitSelected(fitID=fitID))
def Destroy(self):
self.parent.Unbind(EVT_NOTEBOOK_PAGE_CHANGED, handler=self.pageChanged)
self.parent.Unbind(gui.chromeTabs.EVT_NOTEBOOK_PAGE_CHANGED, handler=self.pageChanged)
self.mainFrame.Unbind(GE.FIT_CHANGED, handler=self.fitChanged)
self.mainFrame.Unbind(gui.shipBrowser.EVT_FIT_RENAMED, handler=self.fitRenamed)
self.mainFrame.Unbind(gui.shipBrowser.EVT_FIT_REMOVED, handler=self.fitRemoved)

View File

@@ -55,8 +55,6 @@ class DmgPatternTextValidor(BaseValidator):
class DmgPatternEntityEditor(EntityEditor):
def __init__(self, parent):
EntityEditor.__init__(self, parent, "Damage Profile")
self.btnDelete = None
self.btnRename = None
self.SetEditorValidator(DmgPatternTextValidor)
def getEntitiesFromContext(self):

View File

@@ -19,7 +19,6 @@
class StatsView(object):
name = None
views = {}
def __init__(self):

View File

@@ -27,7 +27,6 @@ class ViewColumn(object):
Once the missing methods are correctly implemented,
they can be used as columns in a view.
"""
name = None
columns = {}
def __init__(self, fittingView):

View File

@@ -59,7 +59,6 @@ if not hasattr(sys, 'frozen'):
try:
import wxversion
except ImportError:
wxversion = None
print("Cannot find wxPython\nYou can download wxPython (2.8+) from http://www.wxpython.org/")
sys.exit(1)
@@ -87,8 +86,6 @@ if not hasattr(sys, 'frozen'):
"You can download sqlalchemy (0.5.8+) from http://www.sqlalchemy.org/".format(sqlalchemy.__version__))
sys.exit(1)
else:
if not sqlalchemy:
sqlalchemy = None
print("Unknown sqlalchemy version string format, skipping check")
except ImportError:
@@ -100,7 +97,6 @@ if not hasattr(sys, 'frozen'):
# noinspection PyPackageRequirements
import dateutil.parser # noqa - Copied import statement from service/update.py
except ImportError:
dateutil = None
print("Cannot find python-dateutil.\nYou can download python-dateutil from https://pypi.python.org/pypi/python-dateutil")
sys.exit(1)

View File

@@ -41,7 +41,6 @@ logger = logging.getLogger(__name__)
class Fit(object):
instance = None
ID = None
@classmethod
def getInstance(cls):

View File

@@ -173,7 +173,6 @@ class Market(object):
instance = None
def __init__(self):
self.getPrice = None
self.priceCache = {}
# Init recently used module storage