Import AITURK IDE 1.0.0-beta.1 from Hermes 63279301; preserve MIT license
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
"""Platform scope rules for configured toolsets.
|
||||
|
||||
This module is intentionally independent of tool resolution and CLI setup so
|
||||
configuration validation and runtime resolution apply the same platform policy.
|
||||
"""
|
||||
|
||||
from typing import Set
|
||||
|
||||
|
||||
# Toolsets without a restriction entry are available on every platform.
|
||||
_TOOLSET_PLATFORM_RESTRICTIONS = {
|
||||
"discord": {"discord"},
|
||||
"discord_admin": {"discord"},
|
||||
}
|
||||
|
||||
|
||||
def toolset_allowed_for_platform(ts_key: str, platform: str) -> bool:
|
||||
"""Return whether ``ts_key`` is available on ``platform``."""
|
||||
allowed: Set[str] | None = _TOOLSET_PLATFORM_RESTRICTIONS.get(ts_key)
|
||||
return allowed is None or platform in allowed
|
||||
Reference in New Issue
Block a user