docs(pairing): address reviewer comments — comments, error msg, __all__ test

- Clarify SystemExit message for missing/null allowFrom (manager.py)
- Document why Feishu passes content="" for unauthorized DMs
- Document exact-match semantics in BaseChannel.is_allowed()
- Document negligible collision probability in generate_code()
- Add test_all_exports_are_importable for nanobot.pairing.__all__
This commit is contained in:
chengyongru
2026-05-15 15:46:44 +08:00
committed by Xubin Ren
parent ac9a2d0c25
commit 199a1bb8fa
5 changed files with 15 additions and 1 deletions
+9
View File
@@ -2,9 +2,18 @@ import time
import pytest
from nanobot.pairing import __all__ as pairing_all
from nanobot.pairing import store
def test_all_exports_are_importable():
"""Every name in __all__ must actually be importable from nanobot.pairing."""
import nanobot.pairing as pkg
for name in pairing_all:
assert hasattr(pkg, name), f"{name} is in __all__ but not exported"
@pytest.fixture(autouse=True)
def _tmp_store(tmp_path, monkeypatch):
path = tmp_path / "pairing.json"