MCPcopy Create free account
hub / github.com/anomalyco/opencode-sdk-python / get_architecture

Function get_architecture

src/opencode_ai/_base_client.py:1960–1983  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1958
1959
1960def get_architecture() -> Arch:
1961 try:
1962 machine = platform.machine().lower()
1963 except Exception:
1964 return "unknown"
1965
1966 if machine in ("arm64", "aarch64"):
1967 return "arm64"
1968
1969 # TODO: untested
1970 if machine == "arm":
1971 return "arm"
1972
1973 if machine == "x86_64":
1974 return "x64"
1975
1976 # TODO: untested
1977 if sys.maxsize <= 2**32:
1978 return "x32"
1979
1980 if machine:
1981 return OtherArch(machine)
1982
1983 return "unknown"
1984
1985
1986def _merge_mappings(

Callers 1

platform_headersFunction · 0.85

Calls 1

OtherArchClass · 0.85

Tested by

no test coverage detected