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.

zulip_tools: Rename may_be_perform_purging to maybe_perform_purging.

Anders Kaseorge2cc554077ac
diff --git a/scripts/lib/clean_yarn_cache.py b/scripts/lib/clean_yarn_cache.py
index d05a342ad74..be989c748ac 100644
--- a/scripts/lib/clean_yarn_cache.py
+++ b/scripts/lib/clean_yarn_cache.py
@@ -6,7 +6,7 @@ import sys
ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
sys.path.append(ZULIP_PATH)
-from scripts.lib.zulip_tools import may_be_perform_purging, parse_cache_script_args
+from scripts.lib.zulip_tools import maybe_perform_purging, parse_cache_script_args
YARN_CACHE_PATH = os.path.expanduser("~/.cache/yarn/")
CURRENT_VERSION = "v6"
@@ -30,7 +30,7 @@ def remove_unused_versions_dir(args: argparse.Namespace) -> None:
return
no_headings = getattr(args, "no_headings", False)
- may_be_perform_purging(
+ maybe_perform_purging(
dirs_to_purge,
{current_version_dir},
"yarn cache",
diff --git a/scripts/lib/zulip_tools.py b/scripts/lib/zulip_tools.py
index 724d6f0631f..2ad4cbeaa24 100755
--- a/scripts/lib/zulip_tools.py
+++ b/scripts/lib/zulip_tools.py
@@ -330,7 +330,7 @@ def purge_unused_caches(
caches_to_purge = get_caches_to_be_purged(caches_dir, caches_in_use, args.threshold_days)
caches_to_keep = all_caches - caches_to_purge
- may_be_perform_purging(
+ maybe_perform_purging(
caches_to_purge, caches_to_keep, cache_type, args.dry_run, args.verbose, args.no_headings
)
if args.verbose:
@@ -376,7 +376,7 @@ def generate_sha1sum_emoji(zulip_path: str) -> str:
return sha.hexdigest()
-def may_be_perform_purging(
+def maybe_perform_purging(
dirs_to_purge: Set[str],
dirs_to_keep: Set[str],
dir_type: str,
diff --git a/scripts/purge-old-deployments b/scripts/purge-old-deployments
index 11c7b8e2a03..ec6dbca2fa6 100755
--- a/scripts/purge-old-deployments
+++ b/scripts/purge-old-deployments
@@ -11,7 +11,7 @@ from scripts.lib import clean_unused_caches
from scripts.lib.zulip_tools import (
DEPLOYMENTS_DIR,
get_recent_deployments,
- may_be_perform_purging,
+ maybe_perform_purging,
su_to_zulip,
)
@@ -80,7 +80,7 @@ def main() -> None:
deployments_to_keep = get_recent_deployments(args.threshold_days)
deployments_to_purge = get_deployments_to_be_purged(deployments_to_keep)
- may_be_perform_purging(
+ maybe_perform_purging(
deployments_to_purge, deployments_to_keep, "deployment", args.dry_run, args.verbose, True
)