Update scripts/checks/audit_core_dependencies.py
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
This commit is contained in:
@@ -502,9 +502,9 @@ class InfrastructureVisitor(ast.NodeVisitor):
|
||||
if isinstance(arg, ast.Name) and 'config' in arg.id.lower():
|
||||
return True
|
||||
# Check if json.dumps is used on the argument (common pattern)
|
||||
if isinstance(arg, ast.Call) and isinstance(arg.func, ast.Attribute):
|
||||
if arg.func.attr == 'dumps' and isinstance(arg.func.value, ast.Name) and arg.func.value.id == 'json':
|
||||
return True
|
||||
if isinstance(arg, ast.Call) and isinstance(arg.func, ast.Attribute) and (arg.func.attr == 'dumps' and isinstance(arg.func.value, ast.Name) and arg.func.value.id == 'json'):
|
||||
return True
|
||||
|
||||
|
||||
return False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user