flake8 fixes
This commit is contained in:
@@ -18,8 +18,7 @@
|
|||||||
# ===============================================================================
|
# ===============================================================================
|
||||||
|
|
||||||
from sqlalchemy import Column, String, Integer, Boolean, Table, ForeignKey
|
from sqlalchemy import Column, String, Integer, Boolean, Table, ForeignKey
|
||||||
from sqlalchemy.ext.associationproxy import association_proxy
|
from sqlalchemy.orm import mapper, synonym, deferred
|
||||||
from sqlalchemy.orm import mapper, synonym, relation, deferred
|
|
||||||
|
|
||||||
from eos.db import gamedata_meta
|
from eos.db import gamedata_meta
|
||||||
from eos.gamedata import Effect, ItemEffect
|
from eos.gamedata import Effect, ItemEffect
|
||||||
@@ -45,4 +44,3 @@ mapper(Effect, effects_table,
|
|||||||
})
|
})
|
||||||
|
|
||||||
mapper(ItemEffect, typeeffects_table)
|
mapper(ItemEffect, typeeffects_table)
|
||||||
|
|
||||||
|
|||||||
@@ -125,6 +125,7 @@ def getItems(lookfor, eager=None):
|
|||||||
results.sort(key=lambda x: lookfor.index(x.ID))
|
results.sort(key=lambda x: lookfor.index(x.ID))
|
||||||
return results
|
return results
|
||||||
|
|
||||||
|
|
||||||
@cachedQuery(1, "lookfor")
|
@cachedQuery(1, "lookfor")
|
||||||
def getAlphaClone(lookfor, eager=None):
|
def getAlphaClone(lookfor, eager=None):
|
||||||
if isinstance(lookfor, int):
|
if isinstance(lookfor, int):
|
||||||
@@ -359,6 +360,7 @@ def directAttributeRequest(itemIDs, attrIDs):
|
|||||||
result = gamedata_session.execute(q).fetchall()
|
result = gamedata_session.execute(q).fetchall()
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
def getRequiredFor(itemID, attrMapping):
|
def getRequiredFor(itemID, attrMapping):
|
||||||
Attribute1 = aliased(Attribute)
|
Attribute1 = aliased(Attribute)
|
||||||
Attribute2 = aliased(Attribute)
|
Attribute2 = aliased(Attribute)
|
||||||
|
|||||||
@@ -11,4 +11,3 @@ def upgrade(saveddata_engine):
|
|||||||
saveddata_engine.execute("SELECT secStatus FROM characters LIMIT 1")
|
saveddata_engine.execute("SELECT secStatus FROM characters LIMIT 1")
|
||||||
except sqlalchemy.exc.DatabaseError:
|
except sqlalchemy.exc.DatabaseError:
|
||||||
saveddata_engine.execute("ALTER TABLE characters ADD COLUMN secStatus FLOAT;")
|
saveddata_engine.execute("ALTER TABLE characters ADD COLUMN secStatus FLOAT;")
|
||||||
|
|
||||||
|
|||||||
@@ -250,9 +250,9 @@ mapper(es_Fit, fits_table,
|
|||||||
)
|
)
|
||||||
|
|
||||||
mapper(ProjectedFit, projectedFits_table,
|
mapper(ProjectedFit, projectedFits_table,
|
||||||
properties={
|
properties={
|
||||||
"_ProjectedFit__amount": projectedFits_table.c.amount,
|
"_ProjectedFit__amount": projectedFits_table.c.amount,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
mapper(CommandFit, commandFits_table)
|
mapper(CommandFit, commandFits_table)
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
# along with eos. If not, see <http://www.gnu.org/licenses/>.
|
# along with eos. If not, see <http://www.gnu.org/licenses/>.
|
||||||
# ===============================================================================
|
# ===============================================================================
|
||||||
|
|
||||||
from sqlalchemy import Table, Column, Integer, ForeignKey, CheckConstraint, Boolean, DateTime, select
|
from sqlalchemy import Table, Column, Integer, ForeignKey, CheckConstraint, Boolean, DateTime
|
||||||
from sqlalchemy.orm import relation, mapper
|
from sqlalchemy.orm import relation, mapper
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
@@ -40,6 +40,3 @@ modules_table = Table("modules", saveddata_meta,
|
|||||||
|
|
||||||
mapper(Module, modules_table,
|
mapper(Module, modules_table,
|
||||||
properties={"owner": relation(Fit)})
|
properties={"owner": relation(Fit)})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
type = "passive"
|
type = "passive"
|
||||||
|
|
||||||
|
|
||||||
def handler(fit, src, context):
|
def handler(fit, src, context):
|
||||||
|
|
||||||
# Get pilot sec status bonus directly here, instead of going through the intermediary effects
|
# Get pilot sec status bonus directly here, instead of going through the intermediary effects
|
||||||
|
|||||||
@@ -3,5 +3,7 @@
|
|||||||
# Used by:
|
# Used by:
|
||||||
# Ship: Pacifier
|
# Ship: Pacifier
|
||||||
type = "passive"
|
type = "passive"
|
||||||
|
|
||||||
|
|
||||||
def handler(fit, src, context):
|
def handler(fit, src, context):
|
||||||
fit.ship.boostItemAttr("warpSpeedMultiplier", src.getModifiedItemAttr("eliteBonusCoverOps1"), skill="Covert Ops")
|
fit.ship.boostItemAttr("warpSpeedMultiplier", src.getModifiedItemAttr("eliteBonusCoverOps1"), skill="Covert Ops")
|
||||||
|
|||||||
@@ -3,5 +3,7 @@
|
|||||||
# Used by:
|
# Used by:
|
||||||
# Ship: Enforcer
|
# Ship: Enforcer
|
||||||
type = "passive"
|
type = "passive"
|
||||||
|
|
||||||
|
|
||||||
def handler(fit, src, context):
|
def handler(fit, src, context):
|
||||||
fit.ship.boostItemAttr("warpSpeedMultiplier", src.getModifiedItemAttr("eliteBonusReconShip3"), skill="Recon Ships")
|
fit.ship.boostItemAttr("warpSpeedMultiplier", src.getModifiedItemAttr("eliteBonusReconShip3"), skill="Recon Ships")
|
||||||
|
|||||||
@@ -3,5 +3,7 @@
|
|||||||
# Used by:
|
# Used by:
|
||||||
# Ship: Enforcer
|
# Ship: Enforcer
|
||||||
type = "passive"
|
type = "passive"
|
||||||
|
|
||||||
|
|
||||||
def handler(fit, src, context):
|
def handler(fit, src, context):
|
||||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Stasis Web", "maxRange", src.getModifiedItemAttr("eliteBonusReconShip1"), skill="Recon Ships")
|
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Stasis Web", "maxRange", src.getModifiedItemAttr("eliteBonusReconShip1"), skill="Recon Ships")
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
# Used by:
|
# Used by:
|
||||||
# Ship: Chemosh
|
# Ship: Chemosh
|
||||||
type = "passive"
|
type = "passive"
|
||||||
|
|
||||||
|
|
||||||
def handler(fit, src, context):
|
def handler(fit, src, context):
|
||||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Nosferatu", "powerTransferAmount", src.getModifiedItemAttr("shipBonusDreadnoughtA1"), skill="Amarr Dreadnought")
|
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Nosferatu",
|
||||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Neutralizer", "energyNeutralizerAmount", src.getModifiedItemAttr("shipBonusDreadnoughtA1"), skill="Amarr Dreadnought")
|
"powerTransferAmount", src.getModifiedItemAttr("shipBonusDreadnoughtA1"), skill="Amarr Dreadnought")
|
||||||
|
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Neutralizer",
|
||||||
|
"energyNeutralizerAmount", src.getModifiedItemAttr("shipBonusDreadnoughtA1"), skill="Amarr Dreadnought")
|
||||||
|
|||||||
@@ -3,5 +3,8 @@
|
|||||||
# Used by:
|
# Used by:
|
||||||
# Ship: Chemosh
|
# Ship: Chemosh
|
||||||
type = "passive"
|
type = "passive"
|
||||||
|
|
||||||
|
|
||||||
def handler(fit, src, context):
|
def handler(fit, src, context):
|
||||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Stasis Web", "maxRange", src.getModifiedItemAttr("shipBonusDreadnoughtM1"), skill="Minmatar Dreadnought")
|
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Stasis Web",
|
||||||
|
"maxRange", src.getModifiedItemAttr("shipBonusDreadnoughtM1"), skill="Minmatar Dreadnought")
|
||||||
|
|||||||
@@ -3,5 +3,8 @@
|
|||||||
# Used by:
|
# Used by:
|
||||||
# Ship: Dagon
|
# Ship: Dagon
|
||||||
type = "passive"
|
type = "passive"
|
||||||
|
|
||||||
|
|
||||||
def handler(fit, src, context):
|
def handler(fit, src, context):
|
||||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Nosferatu", "powerTransferAmount", src.getModifiedItemAttr("shipBonusForceAuxiliaryA1"), skill="Amarr Carrier")
|
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Nosferatu",
|
||||||
|
"powerTransferAmount", src.getModifiedItemAttr("shipBonusForceAuxiliaryA1"), skill="Amarr Carrier")
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
# Used by:
|
# Used by:
|
||||||
# Ship: Dagon
|
# Ship: Dagon
|
||||||
type = "passive"
|
type = "passive"
|
||||||
|
|
||||||
|
|
||||||
def handler(fit, src, context):
|
def handler(fit, src, context):
|
||||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Nosferatu", "maxRange", src.getModifiedItemAttr("shipBonusForceAuxiliaryA1"), skill="Amarr Carrier")
|
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Nosferatu",
|
||||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Nosferatu", "falloffEffectiveness", src.getModifiedItemAttr("shipBonusForceAuxiliaryA1"), skill="Amarr Carrier")
|
"maxRange", src.getModifiedItemAttr("shipBonusForceAuxiliaryA1"), skill="Amarr Carrier")
|
||||||
|
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Nosferatu",
|
||||||
|
"falloffEffectiveness", src.getModifiedItemAttr("shipBonusForceAuxiliaryA1"), skill="Amarr Carrier")
|
||||||
|
|||||||
@@ -3,5 +3,8 @@
|
|||||||
# Used by:
|
# Used by:
|
||||||
# Ship: Dagon
|
# Ship: Dagon
|
||||||
type = "passive"
|
type = "passive"
|
||||||
|
|
||||||
|
|
||||||
def handler(fit, src, context):
|
def handler(fit, src, context):
|
||||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Remote Armor Repair Systems"), "duration", src.getModifiedItemAttr("shipBonusForceAuxiliaryM1"), skill="Minmatar Carrier")
|
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Remote Armor Repair Systems"),
|
||||||
|
"duration", src.getModifiedItemAttr("shipBonusForceAuxiliaryM1"), skill="Minmatar Carrier")
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
# Used by:
|
# Used by:
|
||||||
# Ship: Enforcer
|
# Ship: Enforcer
|
||||||
type = "passive"
|
type = "passive"
|
||||||
|
|
||||||
|
|
||||||
def handler(fit, src, context):
|
def handler(fit, src, context):
|
||||||
fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Heavy Missiles"), "explosionDelay", src.getModifiedItemAttr("shipBonusCC2"), skill="Caldari Cruiser")
|
fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Heavy Missiles"),
|
||||||
fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Heavy Assault Missiles"), "explosionDelay", src.getModifiedItemAttr("shipBonusCC2"), skill="Caldari Cruiser")
|
"explosionDelay", src.getModifiedItemAttr("shipBonusCC2"), skill="Caldari Cruiser")
|
||||||
|
fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Heavy Assault Missiles"),
|
||||||
|
"explosionDelay", src.getModifiedItemAttr("shipBonusCC2"), skill="Caldari Cruiser")
|
||||||
|
|||||||
@@ -4,5 +4,7 @@
|
|||||||
# Ship: Chemosh
|
# Ship: Chemosh
|
||||||
# Ship: Molok
|
# Ship: Molok
|
||||||
type = "passive"
|
type = "passive"
|
||||||
|
|
||||||
|
|
||||||
def handler(fit, src, context):
|
def handler(fit, src, context):
|
||||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Capital Energy Turret"), "damageMultiplier", src.getModifiedItemAttr("shipBonusRole3"))
|
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Capital Energy Turret"), "damageMultiplier", src.getModifiedItemAttr("shipBonusRole3"))
|
||||||
|
|||||||
@@ -4,5 +4,7 @@
|
|||||||
# Ship: Dagon
|
# Ship: Dagon
|
||||||
# Ship: Rabisu
|
# Ship: Rabisu
|
||||||
type = "passive"
|
type = "passive"
|
||||||
|
|
||||||
|
|
||||||
def handler(fit, src, context):
|
def handler(fit, src, context):
|
||||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Nosferatu", "cpu", src.getModifiedItemAttr("shipBonusRole4"))
|
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Nosferatu", "cpu", src.getModifiedItemAttr("shipBonusRole4"))
|
||||||
|
|||||||
@@ -3,5 +3,7 @@
|
|||||||
# Used by:
|
# Used by:
|
||||||
# Ship: Dagon
|
# Ship: Dagon
|
||||||
type = "passive"
|
type = "passive"
|
||||||
|
|
||||||
|
|
||||||
def handler(fit, src, context):
|
def handler(fit, src, context):
|
||||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Capital Remote Armor Repair Systems"), "power", src.getModifiedItemAttr("shipBonusRole5"))
|
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Capital Remote Armor Repair Systems"), "power", src.getModifiedItemAttr("shipBonusRole5"))
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
# Used by:
|
# Used by:
|
||||||
# Ship: Pacifier
|
# Ship: Pacifier
|
||||||
type = "passive"
|
type = "passive"
|
||||||
|
|
||||||
|
|
||||||
def handler(fit, src, context):
|
def handler(fit, src, context):
|
||||||
fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Rockets"), "explosionDelay", src.getModifiedItemAttr("shipBonusCF"), skill="Caldari Frigate")
|
fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Rockets"),
|
||||||
fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Light Missiles"), "explosionDelay", src.getModifiedItemAttr("shipBonusCF"), skill="Caldari Frigate")
|
"explosionDelay", src.getModifiedItemAttr("shipBonusCF"), skill="Caldari Frigate")
|
||||||
|
fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Light Missiles"),
|
||||||
|
"explosionDelay", src.getModifiedItemAttr("shipBonusCF"), skill="Caldari Frigate")
|
||||||
|
|||||||
@@ -3,5 +3,8 @@
|
|||||||
# Used by:
|
# Used by:
|
||||||
# Ship: Pacifier
|
# Ship: Pacifier
|
||||||
type = "passive"
|
type = "passive"
|
||||||
|
|
||||||
|
|
||||||
def handler(fit, src, context):
|
def handler(fit, src, context):
|
||||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Small Projectile Turret"), "speed", src.getModifiedItemAttr("shipBonusMF"), skill="Minmatar Frigate")
|
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Small Projectile Turret"),
|
||||||
|
"speed", src.getModifiedItemAttr("shipBonusMF"), skill="Minmatar Frigate")
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
# Used by:
|
# Used by:
|
||||||
# Ship: Molok
|
# Ship: Molok
|
||||||
type = "passive"
|
type = "passive"
|
||||||
|
|
||||||
|
|
||||||
def handler(fit, src, context):
|
def handler(fit, src, context):
|
||||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Nosferatu", "powerTransferAmount", src.getModifiedItemAttr("shipBonusTitanA1"), skill="Amarr Titan")
|
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Nosferatu",
|
||||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Neutralizer", "energyNeutralizerAmount", src.getModifiedItemAttr("shipBonusTitanA1"), skill="Amarr Titan")
|
"powerTransferAmount", src.getModifiedItemAttr("shipBonusTitanA1"), skill="Amarr Titan")
|
||||||
|
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Neutralizer",
|
||||||
|
"energyNeutralizerAmount", src.getModifiedItemAttr("shipBonusTitanA1"), skill="Amarr Titan")
|
||||||
|
|||||||
@@ -3,5 +3,8 @@
|
|||||||
# Used by:
|
# Used by:
|
||||||
# Ship: Molok
|
# Ship: Molok
|
||||||
type = "passive"
|
type = "passive"
|
||||||
|
|
||||||
|
|
||||||
def handler(fit, src, context):
|
def handler(fit, src, context):
|
||||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Stasis Web", "maxRange", src.getModifiedItemAttr("shipBonusTitanM1"), skill="Minmatar Titan")
|
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Stasis Web",
|
||||||
|
"maxRange", src.getModifiedItemAttr("shipBonusTitanM1"), skill="Minmatar Titan")
|
||||||
|
|||||||
@@ -5,14 +5,14 @@
|
|||||||
type = "projected", "active"
|
type = "projected", "active"
|
||||||
|
|
||||||
|
|
||||||
def handler(fit, module, context, *args, **kwargs):
|
def handler(fit, module, context, *args, **kwargs):
|
||||||
if "projected" in context:
|
if "projected" in context:
|
||||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Gunnery"),
|
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Gunnery"),
|
||||||
"trackingSpeed", module.getModifiedItemAttr("trackingSpeedBonus"),
|
"trackingSpeed", module.getModifiedItemAttr("trackingSpeedBonus"),
|
||||||
stackingPenalties=True, *args, **kwargs)
|
stackingPenalties=True, *args, **kwargs)
|
||||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Gunnery"),
|
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Gunnery"),
|
||||||
"maxRange", module.getModifiedItemAttr("maxRangeBonus"),
|
"maxRange", module.getModifiedItemAttr("maxRangeBonus"),
|
||||||
stackingPenalties=True, *args, **kwargs)
|
stackingPenalties=True, *args, **kwargs)
|
||||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Gunnery"),
|
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Gunnery"),
|
||||||
"falloff", module.getModifiedItemAttr("falloffBonus"),
|
"falloff", module.getModifiedItemAttr("falloffBonus"),
|
||||||
stackingPenalties=True, *args, **kwargs)
|
stackingPenalties=True, *args, **kwargs)
|
||||||
|
|||||||
@@ -77,10 +77,11 @@ def apply_rel_listeners(target, context):
|
|||||||
listen(rel, 'append', rel_listener)
|
listen(rel, 'append', rel_listener)
|
||||||
listen(rel, 'remove', rel_listener)
|
listen(rel, 'remove', rel_listener)
|
||||||
|
|
||||||
|
|
||||||
listen(Fit, 'load', apply_rel_listeners)
|
listen(Fit, 'load', apply_rel_listeners)
|
||||||
listen(Module, 'load', apply_col_listeners)
|
listen(Module, 'load', apply_col_listeners)
|
||||||
listen(Drone, 'load', apply_col_listeners)
|
listen(Drone, 'load', apply_col_listeners)
|
||||||
listen(Fighter, 'load', apply_col_listeners)
|
listen(Fighter, 'load', apply_col_listeners)
|
||||||
listen(Cargo, 'load', apply_col_listeners)
|
listen(Cargo, 'load', apply_col_listeners)
|
||||||
listen(Implant, 'load', apply_col_listeners)
|
listen(Implant, 'load', apply_col_listeners)
|
||||||
listen(Booster, 'load', apply_col_listeners)
|
listen(Booster, 'load', apply_col_listeners)
|
||||||
|
|||||||
@@ -359,7 +359,7 @@ class Skill(HandledItem):
|
|||||||
if item.group.category.ID == 16: # Skill category
|
if item.group.category.ID == 16: # Skill category
|
||||||
if level < rlevel:
|
if level < rlevel:
|
||||||
skill = self.character.getSkill(item.ID)
|
skill = self.character.getSkill(item.ID)
|
||||||
#print "Removing skill: {}, Dependant level: {}, Required level: {}".format(skill, level, rlevel)
|
# print "Removing skill: {}, Dependant level: {}, Required level: {}".format(skill, level, rlevel)
|
||||||
skill.setLevel(None, persist)
|
skill.setLevel(None, persist)
|
||||||
pyfalog.debug("Strict Skill levels enabled, time to process {}: {}".format(self.item.ID, time.time() - start))
|
pyfalog.debug("Strict Skill levels enabled, time to process {}: {}".format(self.item.ID, time.time() - start))
|
||||||
|
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ class Fit(object):
|
|||||||
@property
|
@property
|
||||||
def modifiedCoalesce(self):
|
def modifiedCoalesce(self):
|
||||||
"""
|
"""
|
||||||
This is a property that should get whichever date is available for the fit. @todo: migrate old timestamp data
|
This is a property that should get whichever date is available for the fit. @todo: migrate old timestamp data
|
||||||
and ensure created / modified are set in database to get rid of this
|
and ensure created / modified are set in database to get rid of this
|
||||||
"""
|
"""
|
||||||
return self.modified or self.created or datetime.datetime.fromtimestamp(self.timestamp)
|
return self.modified or self.created or datetime.datetime.fromtimestamp(self.timestamp)
|
||||||
|
|||||||
@@ -812,7 +812,7 @@ class ItemDependants(wx.Panel):
|
|||||||
else:
|
else:
|
||||||
itemIcon = -1
|
itemIcon = -1
|
||||||
|
|
||||||
grand = self.reqTree.AppendItem(child, "{}".format(item.name), itemIcon)
|
self.reqTree.AppendItem(child, "{}".format(item.name), itemIcon)
|
||||||
|
|
||||||
|
|
||||||
class ItemEffects(wx.Panel):
|
class ItemEffects(wx.Panel):
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
import sys
|
import sys
|
||||||
import os.path
|
import os.path
|
||||||
from logbook import Logger
|
from logbook import Logger
|
||||||
import datetime
|
|
||||||
|
|
||||||
import sqlalchemy
|
import sqlalchemy
|
||||||
# noinspection PyPackageRequirements
|
# noinspection PyPackageRequirements
|
||||||
|
|||||||
@@ -424,7 +424,7 @@ class NavigationPanel(SFItem.SFBrowserItem):
|
|||||||
def OnResize(self, event):
|
def OnResize(self, event):
|
||||||
self.Refresh()
|
self.Refresh()
|
||||||
|
|
||||||
def ToggleRecentShips(self, bool = None, emitEvent = True):
|
def ToggleRecentShips(self, bool=None, emitEvent=True):
|
||||||
# this is so janky. Need to revaluate pretty much entire ship browser. >.<
|
# this is so janky. Need to revaluate pretty much entire ship browser. >.<
|
||||||
toggle = bool if bool is not None else not self.shipBrowser.recentFits
|
toggle = bool if bool is not None else not self.shipBrowser.recentFits
|
||||||
|
|
||||||
@@ -958,7 +958,7 @@ class ShipBrowser(wx.Panel):
|
|||||||
|
|
||||||
def importStage(self, event):
|
def importStage(self, event):
|
||||||
"""
|
"""
|
||||||
The import stage handles both displaying fits after importing as well as displaying recent fits. todo: need to
|
The import stage handles both displaying fits after importing as well as displaying recent fits. todo: need to
|
||||||
reconcile these two better into a more uniform function, right now hacked together to get working
|
reconcile these two better into a more uniform function, right now hacked together to get working
|
||||||
"""
|
"""
|
||||||
self.lpane.ShowLoading(False)
|
self.lpane.ShowLoading(False)
|
||||||
@@ -1946,7 +1946,7 @@ class FitItem(SFItem.SFBrowserItem):
|
|||||||
mdc.SetFont(self.fontNormal)
|
mdc.SetFont(self.fontNormal)
|
||||||
|
|
||||||
fitDate = self.timestamp.strftime("%m/%d/%Y %H:%M")
|
fitDate = self.timestamp.strftime("%m/%d/%Y %H:%M")
|
||||||
fitLocalDate = fitDate #"%d/%02d/%02d %02d:%02d" % (fitDate[0], fitDate[1], fitDate[2], fitDate[3], fitDate[4])
|
fitLocalDate = fitDate # "%d/%02d/%02d %02d:%02d" % (fitDate[0], fitDate[1], fitDate[2], fitDate[3], fitDate[4])
|
||||||
pfdate = drawUtils.GetPartialText(mdc, fitLocalDate,
|
pfdate = drawUtils.GetPartialText(mdc, fitLocalDate,
|
||||||
self.toolbarx - self.textStartx - self.padding * 2 - self.thoverw)
|
self.toolbarx - self.textStartx - self.padding * 2 - self.thoverw)
|
||||||
|
|
||||||
|
|||||||
2
pyfa.py
2
pyfa.py
@@ -24,7 +24,6 @@ import platform
|
|||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
import traceback
|
import traceback
|
||||||
from imp import find_module
|
|
||||||
from optparse import AmbiguousOptionError, BadOptionError, OptionParser
|
from optparse import AmbiguousOptionError, BadOptionError, OptionParser
|
||||||
|
|
||||||
from logbook import CRITICAL, DEBUG, ERROR, FingersCrossedHandler, INFO, Logger, NestedSetup, NullHandler, StreamHandler, TimedRotatingFileHandler, WARNING, \
|
from logbook import CRITICAL, DEBUG, ERROR, FingersCrossedHandler, INFO, Logger, NestedSetup, NullHandler, StreamHandler, TimedRotatingFileHandler, WARNING, \
|
||||||
@@ -359,6 +358,7 @@ if __name__ == "__main__":
|
|||||||
if 'wxMac' not in wx.PlatformInfo or ('wxMac' in wx.PlatformInfo and wx.VERSION >= (3, 0)):
|
if 'wxMac' not in wx.PlatformInfo or ('wxMac' in wx.PlatformInfo and wx.VERSION >= (3, 0)):
|
||||||
try:
|
try:
|
||||||
import requests
|
import requests
|
||||||
|
config.requestsVersion = requests.__version
|
||||||
except ImportError:
|
except ImportError:
|
||||||
raise PreCheckException("Cannot import requests. You can download requests from https://pypi.python.org/pypi/requests.")
|
raise PreCheckException("Cannot import requests. You can download requests from https://pypi.python.org/pypi/requests.")
|
||||||
|
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ class Character(object):
|
|||||||
data += u"Skills required for {}:\n".format(item)
|
data += u"Skills required for {}:\n".format(item)
|
||||||
data += u"{}{}: {}\n".format(" " * s["indent"], s["skill"], int(s["level"]))
|
data += u"{}{}: {}\n".format(" " * s["indent"], s["skill"], int(s["level"]))
|
||||||
data += u"-" * 79 + "\n"
|
data += u"-" * 79 + "\n"
|
||||||
except Exception, e:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
|||||||
2
tox.ini
2
tox.ini
@@ -13,4 +13,4 @@ commands = py.test -vv --cov Pyfa tests/
|
|||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
deps = flake8
|
deps = flake8
|
||||||
# TODO: Remove E731 and convert lambdas to defs
|
# TODO: Remove E731 and convert lambdas to defs
|
||||||
commands = flake8 --exclude=.svn,CVS,.bzr,.hg,.git,__pycache__,venv,tests,.tox,build,dist,__init__.py --ignore=E121,E126,E127,E128,E203,E731 service gui eos utils config.py pyfa.py --max-line-length=165
|
commands = flake8 --exclude=.svn,CVS,.bzr,.hg,.git,__pycache__,venv,tests,.tox,build,dist,__init__.py,floatspin.py --ignore=E121,E126,E127,E128,E203,E731 service gui eos utils config.py pyfa.py --max-line-length=165
|
||||||
|
|||||||
Reference in New Issue
Block a user