--- a/eric6/Plugins/CheckerPlugins/CodeStyleChecker/Security/Checks/tryExcept.py Fri Apr 02 11:59:41 2021 +0200 +++ b/eric6/Plugins/CheckerPlugins/CodeStyleChecker/Security/Checks/tryExcept.py Sat May 01 14:27:20 2021 +0200 @@ -47,10 +47,11 @@ @param config dictionary with configuration data @type dict """ - if config and "check_typed_exception" in config: - checkTypedException = config["check_typed_exception"] - else: - checkTypedException = SecurityDefaults["check_typed_exception"] + checkTypedException = ( + config["check_typed_exception"] + if config and "check_typed_exception" in config else + SecurityDefaults["check_typed_exception"] + ) node = context.node if len(node.body) == 1: @@ -82,10 +83,11 @@ @param config dictionary with configuration data @type dict """ - if config and "check_typed_exception" in config: - checkTypedException = config["check_typed_exception"] - else: - checkTypedException = SecurityDefaults["check_typed_exception"] + checkTypedException = ( + config["check_typed_exception"] + if config and "check_typed_exception" in config else + SecurityDefaults["check_typed_exception"] + ) node = context.node if len(node.body) == 1: