Remove redundant parenthesis

This commit is contained in:
blitzmann
2018-09-16 01:11:16 -04:00
parent 5850026aa9
commit 31c3101d6d
24 changed files with 45 additions and 45 deletions

View File

@@ -33,10 +33,10 @@ class Attribute(object):
@staticmethod
def getAttributeInfo(identity):
if isinstance(identity, (int, str)):
info = eos.db.getAttributeInfo(identity, eager=("unit"))
info = eos.db.getAttributeInfo(identity, eager="unit")
elif isinstance(identity, (int, float)):
id_ = int(identity)
info = eos.db.getAttributeInfo(id_, eager=("unit"))
info = eos.db.getAttributeInfo(id_, eager="unit")
else:
info = None
return info

View File

@@ -337,7 +337,7 @@ class Character(object):
@staticmethod
def getApiDetails(charID):
# todo: fix this (or get rid of?)
return ("", "", "", [])
return "", "", "", []
char = eos.db.getCharacter(charID)
if char.chars is not None:
chars = json.loads(char.chars)

View File

@@ -138,7 +138,7 @@ class Esi(EsiAccess):
def handleLogin(self, message):
# we already have authenticated stuff for the auto mode
if (self.settings.get('ssoMode') == SsoMode.AUTO):
if self.settings.get('ssoMode') == SsoMode.AUTO:
ssoInfo = message['SSOInfo'][0]
auth_response = json.loads(base64.b64decode(ssoInfo))
else:

View File

@@ -63,7 +63,7 @@ class APIException(Exception):
elif 'message' in self.response:
return 'HTTP Error %s: %s' % (self.status_code,
self.response['message'])
return 'HTTP Error %s' % (self.status_code)
return 'HTTP Error %s' % self.status_code
class ESIEndpoints(Enum):
@@ -89,7 +89,7 @@ class EsiAccess(object):
@property
def sso_url(self):
if (self.settings.get("ssoMode") == SsoMode.CUSTOM):
if self.settings.get("ssoMode") == SsoMode.CUSTOM:
return "https://login.eveonline.com"
return "https://www.pyfa.io"
@@ -136,7 +136,7 @@ class EsiAccess(object):
def getLoginURI(self, redirect=None):
self.state = str(uuid.uuid4())
if (self.settings.get("ssoMode") == SsoMode.AUTO):
if self.settings.get("ssoMode") == SsoMode.AUTO:
args = {
'state': self.state,
'pyfa_version': config.version,
@@ -256,7 +256,7 @@ class EsiAccess(object):
self._session.headers.update(self.get_oauth_header(ssoChar.accessToken))
def _after_request(self, resp):
if ("warning" in resp.headers):
if "warning" in resp.headers:
pyfalog.warn("{} - {}".format(resp.headers["warning"], resp.url))
if resp.status_code >= 400:

View File

@@ -42,7 +42,7 @@ from utils.deprecated import deprecated
pyfalog = Logger(__name__)
class DeferRecalc():
class DeferRecalc:
def __init__(self, fitID):
self.fitID = fitID
self.sFit = Fit.getInstance()

View File

@@ -458,7 +458,7 @@ class FitDeprecated(object):
if m.isValidState(State.ACTIVE):
m.state = State.ACTIVE
if (recalc):
if recalc:
# As some items may affect state-limiting attributes of the ship, calculate new attributes first
self.recalc(fit)
# Then, check states of all modules and change where needed. This will recalc if needed

View File

@@ -26,7 +26,7 @@ class RigSize(Enum):
CAPITAL = 4
class EfsPort():
class EfsPort:
wepTestSet = {}
version = 0.01
@@ -497,7 +497,7 @@ class EfsPort():
# Since the effect modules are fairly opaque a mock test fit is used to test the impact of traits.
# standin class used to prevent . notation causing issues when used as an arg
class standin():
class standin:
pass
tf = standin()
tf.modules = HandledList(turrets + launchers)

View File

@@ -9,7 +9,7 @@ class PreCheckException(Exception):
pass
class PreCheckMessage():
class PreCheckMessage:
def __init__(self, msg):
# wx may not be installed, in which case print to console. For all other prechecks, should pop up a MessageDialog
try: