Skip to content

Commit 97f4401

Browse files
committed
flake8 - import order, spacing
1 parent 01f3e76 commit 97f4401

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

roundup/password.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,17 @@
1919
"""
2020
__docformat__ = 'restructuredtext'
2121

22-
import re, string
22+
import re
23+
import string
24+
import warnings
25+
2326
from base64 import b64encode, b64decode
2427
from hashlib import md5, sha1
2528

26-
from roundup.anypy.strings import us2s, b2s, s2b
2729
import roundup.anypy.random_ as random_
2830

29-
import warnings
31+
from roundup.anypy.strings import us2s, b2s, s2b
32+
3033

3134
try:
3235
with warnings.catch_warnings():
@@ -90,7 +93,8 @@ def _pbkdf2(password, salt, rounds, keylen):
9093

9194
def xor_bytes(left, right):
9295
"perform bitwise-xor of two byte-strings"
93-
return _bjoin(bchr(bord(l) ^ bord(r)) for l, r in zip(left, right))
96+
return _bjoin(bchr(bord(l) ^ bord(r))
97+
for l, r in zip(left, right)) # noqa: E741
9498

9599
def _pbkdf2(password, salt, rounds, keylen):
96100
digest_size = 20 # sha1 generates 20-byte blocks
@@ -362,8 +366,10 @@ def __str__(self):
362366
raise ValueError('Password not set')
363367
return '{%s}%s' % (self.scheme, self.password)
364368

369+
365370
def test_missing_crypt():
366-
p = encodePassword('sekrit', 'crypt')
371+
p = encodePassword('sekrit', 'crypt') # noqa: F841 - test only
372+
367373

368374
def test():
369375
# SHA

0 commit comments

Comments
 (0)