From 983f8f03e6681f78c756c7bedc9d0150e8984d12 Mon Sep 17 00:00:00 2001 From: shariqueahmad108-ship-it Date: Tue, 25 Aug 2026 12:31:17 +0530 Subject: [PATCH] Remove unused template globals from helpers.py __all__ (#13422) safesort, private_collection_in, and private_collections are registered as Templetor template globals via openlibrary/core/helpers.py __all__ (consumed at helpers.py:367), but no template references them. Remove the three entries from __all__ to de-register them as template globals. The function definitions stay in helpers.py and every Python caller uses a direct import or module-attribute access (core/models.py, core/lists/model.py, tests/core/test_helpers.py), so they are unaffected. There is no `from openlibrary.core.helpers import *` in the codebase, so __all__ feeds only the template-global builder. Verified by grepping .py/.html/.js/.md across the repo (zero template/JS references to any of the three). --- openlibrary/core/helpers.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/openlibrary/core/helpers.py b/openlibrary/core/helpers.py index 9e928e099e7..e745f25f9dc 100644 --- a/openlibrary/core/helpers.py +++ b/openlibrary/core/helpers.py @@ -42,10 +42,7 @@ "format_decimal", "parse_datetime", # function imported from elsewhere "percentage", - "private_collection_in", - "private_collections", "safeint", # function imported from elsewhere - "safesort", "sanitize", "sprintf", "texsafe",