diff roundup/password.py @ 6981:aa629aebac41

flake8 - import order, spacing
author John Rouillard <rouilj@ieee.org>
date Wed, 14 Sep 2022 20:23:42 -0400
parents 469ad03e6cb8
children cfdcaf8b5936
line wrap: on
line diff
--- a/roundup/password.py	Wed Sep 14 20:19:59 2022 -0400
+++ b/roundup/password.py	Wed Sep 14 20:23:42 2022 -0400
@@ -19,14 +19,17 @@
 """
 __docformat__ = 'restructuredtext'
 
-import re, string
+import re
+import string
+import warnings
+
 from base64 import b64encode, b64decode
 from hashlib import md5, sha1
 
-from roundup.anypy.strings import us2s, b2s, s2b
 import roundup.anypy.random_ as random_
 
-import warnings
+from roundup.anypy.strings import us2s, b2s, s2b
+
 
 try:
     with warnings.catch_warnings():
@@ -90,7 +93,8 @@
 
     def xor_bytes(left, right):
         "perform bitwise-xor of two byte-strings"
-        return _bjoin(bchr(bord(l) ^ bord(r)) for l, r in zip(left, right))
+        return _bjoin(bchr(bord(l) ^ bord(r))
+                      for l, r in zip(left, right))  # noqa: E741
 
     def _pbkdf2(password, salt, rounds, keylen):
         digest_size = 20  # sha1 generates 20-byte blocks
@@ -362,8 +366,10 @@
             raise ValueError('Password not set')
         return '{%s}%s' % (self.scheme, self.password)
 
+
 def test_missing_crypt():
-    p = encodePassword('sekrit', 'crypt')
+    p = encodePassword('sekrit', 'crypt')      # noqa: F841   - test only
+
 
 def test():
     # SHA

Roundup Issue Tracker: http://roundup-tracker.org/