Private
Public Access
misc
This commit is contained in:
+4
-28
File diff suppressed because one or more lines are too long
@@ -35,10 +35,8 @@ def register(cap: VendorCapabilities) -> None:
|
||||
_REGISTRY[(cap.vendor, cap.model)] = cap
|
||||
|
||||
def get_capabilities(vendor: str, model: str) -> VendorCapabilities:
|
||||
if (vendor, model) in _REGISTRY:
|
||||
return _REGISTRY[(vendor, model)]
|
||||
if (vendor, '*') in _REGISTRY:
|
||||
return _REGISTRY[(vendor, '*')]
|
||||
if (vendor, model) in _REGISTRY: return _REGISTRY[(vendor, model)]
|
||||
if (vendor, '*') in _REGISTRY: return _REGISTRY[(vendor, '*')]
|
||||
raise KeyError(f'No capabilities registered for vendor={vendor!r} model={model!r}')
|
||||
|
||||
def list_models_for_vendor(vendor: str) -> list[str]:
|
||||
|
||||
Reference in New Issue
Block a user