PEP 8 cleanup. (#20789)

* PEP 8 E703 cleanup.
* PEP 8 E701 cleanup.
* PEP 8 E711 cleanup.
* PEP 8 W191 and E101 cleanup.
This commit is contained in:
Matt Clay 2017-01-28 00:12:11 -08:00 committed by GitHub
commit d0d1158c5e
72 changed files with 184 additions and 174 deletions

View file

@ -82,7 +82,7 @@ class CallbackModule(CallbackBase):
self.task_output_limit = os.getenv('PROFILE_TASKS_TASK_OUTPUT_LIMIT', 20)
if self.sort_order == 'ascending':
self.sort_order = False;
self.sort_order = False
if self.task_output_limit == 'all':
self.task_output_limit = None

View file

@ -265,7 +265,7 @@ def get_encrypted_password(password, hashtype='sha512', salt=None):
encrypted = crypt.crypt(password, saltstring)
else:
if hashtype == 'blowfish':
cls = passlib.hash.bcrypt;
cls = passlib.hash.bcrypt
else:
cls = getattr(passlib.hash, '%s_crypt' % hashtype)

View file

@ -65,11 +65,11 @@ def union(a, b):
def min(a):
_min = __builtins__.get('min')
return _min(a);
return _min(a)
def max(a):
_max = __builtins__.get('max')
return _max(a);
return _max(a)
def logarithm(x, base=math.e):

View file

@ -50,12 +50,12 @@ class HashiVault:
self.url = kwargs.get('url', ANSIBLE_HASHI_VAULT_ADDR)
self.token = kwargs.get('token')
if self.token==None:
if self.token is None:
raise AnsibleError("No Vault Token specified")
# split secret arg, which has format 'secret/hello:value' into secret='secret/hello' and secret_field='value'
s = kwargs.get('secret')
if s==None:
if s is None:
raise AnsibleError("No secret specified")
s_f = s.split(':')