bajillion pep8 fixes to pass tox
This commit is contained in:
@@ -667,10 +667,10 @@ class Fit(object):
|
||||
standardAttackActive = True
|
||||
else:
|
||||
# Activate all other abilities (Neut, Web, etc) except propmods if no standard attack is active
|
||||
if (ability.effect.isImplemented
|
||||
and standardAttackActive is False
|
||||
and ability.effect.handlerName != u'fighterabilitymicrowarpdrive'
|
||||
and ability.effect.handlerName != u'fighterabilityevasivemaneuvers'):
|
||||
if ability.effect.isImplemented and \
|
||||
standardAttackActive is False and \
|
||||
ability.effect.handlerName != u'fighterabilitymicrowarpdrive' and \
|
||||
ability.effect.handlerName != u'fighterabilityevasivemaneuvers':
|
||||
ability.active = True
|
||||
|
||||
if used >= total:
|
||||
|
||||
@@ -360,7 +360,16 @@ class Market():
|
||||
("complex", frozenset((6,))),
|
||||
("officer", frozenset((5,)))])
|
||||
self.SEARCH_CATEGORIES = (
|
||||
"Drone", "Module", "Subsystem", "Charge", "Implant", "Deployable", "Fighter", "Structure", "Structure Module")
|
||||
"Drone",
|
||||
"Module",
|
||||
"Subsystem",
|
||||
"Charge",
|
||||
"Implant",
|
||||
"Deployable",
|
||||
"Fighter",
|
||||
"Structure",
|
||||
"Structure Module",
|
||||
)
|
||||
self.SEARCH_GROUPS = ("Ice Product",)
|
||||
self.ROOT_MARKET_GROUPS = (9, # Modules
|
||||
1111, # Rigs
|
||||
@@ -377,7 +386,7 @@ class Market():
|
||||
|
||||
@classmethod
|
||||
def getInstance(cls):
|
||||
if cls.instance == None:
|
||||
if cls.instance is None:
|
||||
cls.instance = Market()
|
||||
return cls.instance
|
||||
|
||||
@@ -385,7 +394,7 @@ class Market():
|
||||
"""Creates reverse dictionary"""
|
||||
rev = {}
|
||||
for item, value in orig.items():
|
||||
if not value in rev:
|
||||
if value not in rev:
|
||||
rev[value] = set()
|
||||
rev[value].add(item)
|
||||
return rev
|
||||
@@ -796,7 +805,7 @@ class Market():
|
||||
def cb():
|
||||
try:
|
||||
callback(requests)
|
||||
except Exception, e:
|
||||
except Exception:
|
||||
pass
|
||||
eos.db.commit()
|
||||
|
||||
@@ -819,7 +828,7 @@ class Market():
|
||||
|
||||
def clearPriceCache(self):
|
||||
self.priceCache.clear()
|
||||
deleted_rows = eos.db.clearPrices()
|
||||
eos.db.clearPrices()
|
||||
|
||||
def getSystemWideEffects(self):
|
||||
"""
|
||||
@@ -862,7 +871,7 @@ class Market():
|
||||
groupname = re.sub(garbage, "", groupname)
|
||||
groupname = re.sub(" {2,}", " ", groupname).strip()
|
||||
# Add stuff to dictionary
|
||||
if not groupname in effects:
|
||||
if groupname not in effects:
|
||||
effects[groupname] = set()
|
||||
effects[groupname].add((beacon, beaconname, shortname))
|
||||
# Break loop on 1st result
|
||||
|
||||
@@ -35,7 +35,7 @@ from service.fit import Fit
|
||||
|
||||
import wx
|
||||
|
||||
from eos.types import State, Slot, Module, Cargo, Fit, Ship, Drone, Implant, Booster, Citadel
|
||||
from eos.types import State, Slot, Module, Cargo, Ship, Drone, Implant, Booster, Citadel
|
||||
from service.crest import Crest
|
||||
from service.market import Market
|
||||
|
||||
@@ -823,8 +823,8 @@ class Port(object):
|
||||
slot = module.slot
|
||||
if slot not in stuff:
|
||||
stuff[slot] = []
|
||||
curr = module.item.name if module.item else (
|
||||
"[Empty %s slot]" % Slot.getName(slot).capitalize() if slot is not None else "")
|
||||
curr = module.item.name if module.item \
|
||||
else ("[Empty %s slot]" % Slot.getName(slot).capitalize() if slot is not None else "")
|
||||
if module.charge and sFit.serviceFittingOptions["exportCharges"]:
|
||||
curr += ", %s" % module.charge.name
|
||||
if module.state == State.OFFLINE:
|
||||
|
||||
@@ -32,8 +32,10 @@ class PrefetchThread(threading.Thread):
|
||||
# We're a daemon thread, as such, interpreter might get shut down while we do stuff
|
||||
# Make sure we don't throw tracebacks to console
|
||||
try:
|
||||
es_Character.setSkillList(db.getItemsByCategory("Skill", eager=(
|
||||
"effects", "attributes", "attributes.info.icon", "attributes.info.unit", "icon")))
|
||||
es_Character.setSkillList(db.getItemsByCategory(
|
||||
"Skill",
|
||||
eager=("effects", "attributes", "attributes.info.icon", "attributes.info.unit", "icon")
|
||||
))
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
@@ -102,8 +102,7 @@ class WeakCiphersHTTPSConnection(urllib3.connection.VerifiedHTTPSConnection): #
|
||||
self.is_verified = (resolved_cert_reqs == ssl.CERT_REQUIRED or self.assert_fingerprint is not None)
|
||||
|
||||
|
||||
class WeakCiphersHTTPSConnectionPool(
|
||||
urllib3.connectionpool.HTTPSConnectionPool):
|
||||
class WeakCiphersHTTPSConnectionPool(urllib3.connectionpool.HTTPSConnectionPool):
|
||||
ConnectionCls = WeakCiphersHTTPSConnection
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user