more PEP8 cleanup
This commit is contained in:
@@ -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():
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user