From 5428618cafdd85d5cb8701309dc617ece612dddb Mon Sep 17 00:00:00 2001 From: James McKinney <26463+jpmckinney@users.noreply.github.com> Date: Wed, 9 Oct 2024 03:02:29 -0400 Subject: [PATCH] fix: Fix regular expression for CTE name --- manage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manage.py b/manage.py index 3868f40..19f9ae5 100755 --- a/manage.py +++ b/manage.py @@ -165,7 +165,7 @@ def dependency_graph(files): for object_name in re.findall(r'\b(?:FROM|JOIN)\s+(\w+)', content, flags=re.MULTILINE): imports[identifier].add(object_name) imports[identifier].update(imports_from_function) - for object_name in re.findall(r'(?:\n|\bWITH\s+)(\w+)\s+AS', content, flags=re.MULTILINE): + for object_name in re.findall(r'(?:,\n+|\bWITH\s+)(\w+)\s+AS', content, flags=re.MULTILINE): imports[identifier].discard(object_name) imports[identifier].difference_update(exports | ignore)