fix: bot-lint nits — drop unused imports, add reason to except
Resolves three github-code-quality threads blocking PR-2739 merge: - workspace/tests/test_mcp_cli_multi_workspace.py: remove unused `import os` and `from unittest.mock import patch` (left over from an earlier test draft that mocked at the os.environ layer). - workspace/mcp_cli.py:523: replace bare `pass` in the register_workspace_token ImportError handler with a debug log line + one-line comment explaining the silent-degrade contract (older installs that don't yet ship the helper fall back to the legacy single-token path; single-workspace operators see no behavior change). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
6fb9bc9bcd
commit
3195657837
@ -521,7 +521,10 @@ def main() -> None:
|
|||||||
for wsid, tok in workspaces:
|
for wsid, tok in workspaces:
|
||||||
register_workspace_token(wsid, tok)
|
register_workspace_token(wsid, tok)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
# Older installs that don't yet ship register_workspace_token —
|
||||||
|
# multi-workspace resolution silently degrades to the legacy
|
||||||
|
# single-token path; single-workspace operators see no change.
|
||||||
|
logger.debug("platform_auth.register_workspace_token unavailable; skipping registry populate")
|
||||||
|
|
||||||
# Standalone-mode register + heartbeat. Skipped via env var so an
|
# Standalone-mode register + heartbeat. Skipped via env var so an
|
||||||
# in-container caller (which has its own heartbeat loop) can reuse
|
# in-container caller (which has its own heartbeat loop) can reuse
|
||||||
|
|||||||
@ -8,10 +8,8 @@ breaks multi-workspace doesn't get hidden in a 1000-line test file.
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import json
|
import json
|
||||||
import os
|
|
||||||
import sys
|
import sys
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from unittest.mock import patch
|
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user