ToolRegistry
registry.ToolRegistry(supported)Registry of supported external tools.
Attributes
| Name | Type | Description |
|---|---|---|
| supported | dict[str, list[str]] | Dictionary of supported tools. The key (e.g. radon-cc) maps to the full command (e.g. ["radon", "cc"]). |
| tool_label | str | Used in error messages, e.g., “linter” or “formatter”. |
Methods
| Name | Description |
|---|---|
| check_available | Check if a tool is available in the user’s system. |
| check_supported | Check if a tool is supported by lintquarto. |
| status_list | Return list of availability of all supported tools. |
check_available
registry.ToolRegistry.check_available(tool_name)Check if a tool is available in the user’s system.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| tool_name | str | Name of the tool to check. | required |
Raises
| Name | Type | Description |
|---|---|---|
| FileNotFoundError | If the tool’s command is not found in the user’s PATH. |
check_supported
registry.ToolRegistry.check_supported(tool_name)Check if a tool is supported by lintquarto.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| tool_name | str | Name of the tool to check. | required |
Raises
| Name | Type | Description |
|---|---|---|
| ValueError | If tool is not supported. |
status_list
registry.ToolRegistry.status_list()Return list of availability of all supported tools.
Returns
| Name | Type | Description |
|---|---|---|
| list[dict[str, object]] | List of dictionaries with tool name and availability. |