Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

clean_unused_caches: Allow the main function to accept `Namespace` args.

Riken Shah45af71e33bdf
diff --git a/scripts/lib/clean_unused_caches.py b/scripts/lib/clean_unused_caches.py
index ee09987f25f..929f5beca80 100755
--- a/scripts/lib/clean_unused_caches.py
+++ b/scripts/lib/clean_unused_caches.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
+import argparse
import os
import sys
@@ -8,8 +9,7 @@ from scripts.lib import clean_emoji_cache, clean_node_cache, clean_venv_cache, c
from scripts.lib.zulip_tools import parse_cache_script_args
-def main() -> None:
- args = parse_cache_script_args("This script cleans unused Zulip caches.")
+def main(args: argparse.Namespace) -> None:
os.chdir(ZULIP_PATH)
clean_venv_cache.main(args)
clean_node_cache.main(args)
@@ -18,4 +18,5 @@ def main() -> None:
if __name__ == "__main__":
- main()
+ args = parse_cache_script_args("This script cleans unused Zulip caches.")
+ main(args)