Refactor most of the shadowing from outer scopes. This is a super simple change, just changing the variable used inside (mostly) lambdas.

This commit is contained in:
Ebag333
2017-02-10 11:50:04 -08:00
parent 73cc17ce72
commit 2b45a16872
15 changed files with 51 additions and 51 deletions

View File

@@ -169,7 +169,7 @@ class exportHtmlThread(threading.Thread):
""" % (time.time(), dnaUrl, localDate)
HTML += ' <ul data-role="listview" class="ui-listview-outer" data-inset="true" data-filter="true">\n'
categoryList = list(sMkt.getShipRoot())
categoryList.sort(key=lambda ship: ship.name)
categoryList.sort(key=lambda _ship: _ship.name)
count = 0
@@ -178,7 +178,7 @@ class exportHtmlThread(threading.Thread):
HTMLgroup = ''
ships = list(sMkt.getShipList(group.ID))
ships.sort(key=lambda ship: ship.name)
ships.sort(key=lambda _ship: _ship.name)
# Keep track of how many ships per group
groupFits = 0
@@ -248,7 +248,7 @@ class exportHtmlThread(threading.Thread):
def generateMinimalHTML(self, sMkt, sFit, dnaUrl):
""" Generate a minimal HTML version of the fittings, without any javascript or styling"""
categoryList = list(sMkt.getShipRoot())
categoryList.sort(key=lambda ship: ship.name)
categoryList.sort(key=lambda _ship: _ship.name)
count = 0
HTML = ''
@@ -256,9 +256,9 @@ class exportHtmlThread(threading.Thread):
# init market group string to give ships something to attach to
ships = list(sMkt.getShipList(group.ID))
ships.sort(key=lambda ship: ship.name)
ships.sort(key=lambda _ship: _ship.name)
ships.sort(key=lambda ship: ship.name)
ships.sort(key=lambda _ship: _ship.name)
for ship in ships:
fits = sFit.getFitsWithShip(ship.ID)