--- a/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Security/Checks/generalHardcodedPassword.py Sun May 18 17:23:00 2025 +0200 +++ b/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Security/Checks/generalHardcodedPassword.py Mon May 19 14:33:49 2025 +0200 @@ -147,16 +147,19 @@ # go through all (param, value)s and look for candidates for key, val in zip(context.node.args.args, defs): - if ( - isinstance(key, (ast.Name, ast.arg)) - and AstUtilities.isString(val) - and RE_CANDIDATES.search(key.arg) - ): - reportError( - context.node.lineno - 1, - context.node.col_offset, - "S-107", - "L", - "M", - val.value, - ) + if isinstance(key, (ast.Name, ast.arg)): + # Skip if the default value is None + if val is None or ( + isinstance(val, (ast.Constant, ast.NameConstant)) + and val.value is None + ): + continue + if isinstance(val, ast.Str) and RE_CANDIDATES.search(key.arg): + reportError( + context.node.lineno - 1, + context.node.col_offset, + "S-107", + "L", + "M", + val.value, + )