Skip to content

Commit 18a825d

Browse files
committed
chore(restructure_to_namespace): Always allow running restructuring
The script is idempotent (all of the transformation regexps explicitly exclude matches that are already `glean.api_client`).
1 parent 6234990 commit 18a825d

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

.github/scripts/restructure_to_namespace.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ def update_imports_in_file(self, file_path: Path) -> bool:
2929
with open(file_path, "r", encoding="utf-8") as f:
3030
content = f.read()
3131

32-
# Skip if already contains api_client
33-
if "api_client" in content:
34-
return False
35-
3632
original_content = content
3733

3834
# Apply the actual import transformations
@@ -243,13 +239,6 @@ def run(self):
243239
shutil.rmtree(api_client_dir)
244240
print(f"Removed {api_client_dir}")
245241

246-
elif api_client_dir.exists() and any(api_client_dir.iterdir()):
247-
print("✅ Already restructured - api_client/ exists and contains files")
248-
print(
249-
"If you want to force re-restructuring, delete src/glean/api_client/ first"
250-
)
251-
return
252-
253242
print("Starting restructure...")
254243
print(f"Project root: {self.project_root}")
255244
print(f"Source dir: {self.src_dir}")

0 commit comments

Comments
 (0)