Skip to content

Commit 5968c0a

Browse files
Tighten display key-format usage centralization guard
Co-authored-by: Shri Sukhani <shrisukhani@users.noreply.github.com>
1 parent c21c647 commit 5968c0a

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

tests/test_display_helper_usage.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@
1212
Path("client/managers/response_utils.py"),
1313
Path("transport/base.py"),
1414
}
15+
ALLOWED_KEY_FORMAT_CALL_FILES = {
16+
Path("client/managers/extension_utils.py"),
17+
Path("client/managers/response_utils.py"),
18+
Path("client/managers/session_utils.py"),
19+
Path("tools/__init__.py"),
20+
Path("transport/base.py"),
21+
}
1522

1623

1724
def _python_files() -> list[Path]:
@@ -35,7 +42,7 @@ def test_normalize_display_text_usage_is_centralized():
3542
assert violations == []
3643

3744

38-
def test_key_formatting_helper_is_used_outside_display_module():
45+
def test_key_formatting_helper_usage_is_centralized():
3946
helper_usage_files: set[Path] = set()
4047

4148
for path in _python_files():
@@ -46,4 +53,4 @@ def test_key_formatting_helper_is_used_outside_display_module():
4653
if collect_name_call_lines(module, "format_string_key_for_error"):
4754
helper_usage_files.add(relative_path)
4855

49-
assert helper_usage_files != set()
56+
assert helper_usage_files == ALLOWED_KEY_FORMAT_CALL_FILES

0 commit comments

Comments
 (0)