mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-23 07:33:27 -06:00
Pylint: use list comprehension instead of iteration
Iteration over indexes without calling enumeration fuction is not pythonic and should not be used. In this case iteration can be replaced by list comprehension. Fixing this allows to enable pylint consider-using-enumerate check. Reviewed-By: Petr Spacek <pspacek@redhat.com> Reviewed-By: Lukas Slebodnik <lslebodn@redhat.com>
This commit is contained in:
parent
d46cd5d956
commit
195e50b93b
@ -784,11 +784,8 @@ class DomainValidator(object):
|
||||
return info
|
||||
|
||||
def string_to_array(what):
|
||||
blob = [0] * len(what)
|
||||
return [ord(v) for v in what]
|
||||
|
||||
for i in range(len(what)):
|
||||
blob[i] = ord(what[i])
|
||||
return blob
|
||||
|
||||
class TrustDomainInstance(object):
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user