Avoid name repetition in equality comparisons
Multiple equality comparisons on the same variable are combined with OR. Instead you could use `in` (f.e.: `a in [1, 2, 3]`) Change-Id: Icd7e009219e916458a3918064dc7d45991511f62
This commit is contained in:
parent
f738b28167
commit
771eeb36cb
@ -194,8 +194,7 @@ class OAuth1(core.Oauth1DriverV8):
|
||||
|
||||
new_token = RequestToken.from_dict(token_dict)
|
||||
for attr in RequestToken.attributes:
|
||||
if (attr == 'authorizing_user_id' or attr == 'verifier'
|
||||
or attr == 'role_ids'):
|
||||
if attr in ['authorizing_user_id', 'verifier', 'role_ids']:
|
||||
setattr(token_ref, attr, getattr(new_token, attr))
|
||||
|
||||
return token_ref.to_dict()
|
||||
|
Loading…
Reference in New Issue
Block a user