Skip to content

Commit 5fb79b4

Browse files
committed
flake8 cleanups
1 parent e80c34e commit 5fb79b4

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

roundup/password.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ def encodePassword(plaintext, scheme, other=None, config=None):
270270
"encodePassword called without config.",
271271
stack_info=True)
272272
else:
273-
import inspect, traceback
273+
import inspect, traceback # noqa: E401
274274
where = inspect.currentframe()
275275
trace = traceback.format_stack(where)
276276
logger.critical(
@@ -396,7 +396,7 @@ class Password(JournalPassword):
396396
"""
397397

398398
deprecated_schemes = ["SHA", "MD5", "crypt", "plaintext"]
399-
experimental_schemes = [ "PBKDF2S5" ]
399+
experimental_schemes = ["PBKDF2S5"]
400400
known_schemes = ["PBKDF2", "SSHA"] + experimental_schemes + \
401401
deprecated_schemes
402402

@@ -428,7 +428,7 @@ def needs_migration(self, config):
428428
return True
429429
if (self.scheme == "PBKDF2"):
430430
new_rounds = config.PASSWORD_PBKDF2_DEFAULT_ROUNDS
431-
if ("pytest" in sys.modules and
431+
if ("pytest" in sys.modules and
432432
"PYTEST_CURRENT_TEST" in os.environ):
433433
if ("PYTEST_USE_CONFIG" in os.environ):
434434
new_rounds = config.PASSWORD_PBKDF2_DEFAULT_ROUNDS
@@ -540,6 +540,7 @@ def test(config=None):
540540
assert 'sekrit' == p
541541
assert 'not sekrit' != p
542542

543+
543544
if __name__ == '__main__':
544545
# invoking this with:
545546
# PYTHONPATH=. python2 roundup/password.py
@@ -564,7 +565,7 @@ def test(config=None):
564565
test_missing_crypt(CoreConfig())
565566
except PasswordValueError as e:
566567
exception = e
567-
assert exception != None
568+
assert exception is not None
568569
assert exception.__str__() == "Unsupported encryption scheme 'crypt'"
569570

570571
# vim: set filetype=python sts=4 sw=4 et si :

0 commit comments

Comments
 (0)