Commit d392f89f authored by Michael Ströder's avatar Michael Ströder

more readable line-wrapping dict comprehensions

parent 6a0e5ff6
......@@ -66,8 +66,7 @@ def password_checker():
if app.config['PASSWORD_CHECK_MOD']:
password_plugins = {
entry_point.name: entry_point.load()
for entry_point
in pkg_resources.iter_entry_points(PASSWORD_PLUGIN_NAMESPACE)
for entry_point in pkg_resources.iter_entry_points(PASSWORD_PLUGIN_NAMESPACE)
}
if app.config['PASSWORD_CHECK_MOD'] not in password_plugins:
raise KeyError(
......@@ -94,8 +93,7 @@ def otp_checker():
if app.config['OTP_CHECK_MOD']:
otp_plugins = {
entry_point.name: entry_point.load()
for entry_point
in pkg_resources.iter_entry_points(OTP_PLUGIN_NAMESPACE)
for entry_point in pkg_resources.iter_entry_points(OTP_PLUGIN_NAMESPACE)
}
if app.config['OTP_CHECK_MOD'] not in otp_plugins:
raise KeyError(
......
......@@ -23,8 +23,7 @@ class OTPPluginTestCase(unittest.TestCase):
def setUp(self):
self.otp_plugins = {
entry_point.name: entry_point.load()
for entry_point
in pkg_resources.iter_entry_points(OTP_PLUGIN_NAMESPACE)
for entry_point in pkg_resources.iter_entry_points(OTP_PLUGIN_NAMESPACE)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment