Skip to content

Commit 5841d9f

Browse files
Copilotmnriem
andauthored
fix: clarify _is_valid_host_pattern docstring, clean up test sentinel type
Agent-Logs-Url: https://github.com/github/spec-kit/sessions/889b58a7-7f8c-47e2-8056-931ebcc671cc Co-authored-by: mnriem <15701806+mnriem@users.noreply.github.com>
1 parent dda6883 commit 5841d9f

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/specify_cli/authentication/config.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ def _is_valid_host_pattern(pattern: str) -> bool:
4444
forms are accepted:
4545
4646
* ``example.com`` — exact hostname
47-
* ``*.example.com`` — single leading wildcard for one sub-domain level
47+
* ``*.example.com`` — leading ``*.`` wildcard (matches any sub-domain
48+
depth under the suffix, e.g. ``myorg.visualstudio.com`` or
49+
``sub.myorg.visualstudio.com``)
4850
"""
4951
if "*" not in pattern:
5052
return True # exact hostname — already validated as non-empty

tests/test_authentication.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,7 @@ def fake_load(path=None):
715715
def test_cache_bypassed_by_override(self, monkeypatch):
716716
"""When _config_override is set, the cache is ignored entirely."""
717717
from specify_cli.authentication import http as _mod
718-
sentinel: list = [object()] # type: ignore[list-item]
718+
sentinel = [_github_entry()]
719719
monkeypatch.setattr(_mod, "_config_override", sentinel)
720720
monkeypatch.setattr(_mod, "_config_cache", None)
721721

0 commit comments

Comments
 (0)