more PEP8 cleanup

This commit is contained in:
Ebag333
2016-10-19 12:26:03 -07:00
parent 0c0eb327f7
commit 69a122a271
4 changed files with 8 additions and 5 deletions

View File

@@ -93,7 +93,7 @@ if configVal is True:
def removeCachedEntry(type, ID):
if not type in queryCache:
if type not in queryCache:
return
functionCache = queryCache[type]
for _, localCache in functionCache.iteritems():

View File

@@ -79,7 +79,8 @@ class Ship(ItemAttrShortcut, HandledItem):
self.commandBonus = 0
def calculateModifiedAttributes(self, fit, runTime, forceProjected=False):
if forceProjected: return
if forceProjected:
return
for effect in self.item.effects.itervalues():
if effect.runTime == runTime and effect.isType("passive"):
# Ships have effects that utilize the level of a skill as an

View File

@@ -27,7 +27,8 @@ from sqlalchemy.orm import validates
class User(object):
def __init__(self, username, password=None, admin=False):
self.username = username
if password is not None: self.encodeAndSetPassword(password)
if password is not None:
self.encodeAndSetPassword(password)
self.admin = admin
def encodeAndSetPassword(self, pw):
@@ -38,7 +39,8 @@ class User(object):
self.password = ("%s%s" % (h.hexdigest(), salt))
def isPasswordValid(self, pw):
if self.password is None: return False
if self.password is None:
return False
salt = self.password[-32:]
h = hashlib.new("sha256")
h.update(pw)

View File

@@ -18,7 +18,7 @@
# ===============================================================================
from eos.gamedata import Attribute, Category, Effect, Group, Icon, Item, MarketGroup, \
MetaGroup, AttributeInfo, Unit, EffectInfo, MetaType, MetaData, Traits
MetaGroup, AttributeInfo, Unit, EffectInfo, MetaType, MetaData, Traits
from eos.saveddata.price import Price
from eos.saveddata.user import User
from eos.saveddata.crestchar import CrestChar