> ## Documentation Index
> Fetch the complete documentation index at: https://ikun.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 格式化与验证

## 格式化

使用统一的标准对代码库进行格式化，可以为我们节省时间和精力。Agno 模板已预配置了 [ruff](https://docs.astral.sh/ruff/)，您可以通过辅助脚本或直接运行它。

<CodeGroup>
  ```bash terminal theme={null}
  ./scripts/format.sh
  ```

  ```bash ruff theme={null}
  ruff format .
  ```
</CodeGroup>

## 验证

Linting 和类型检查为代码库增加了额外的保护层。我们强烈建议在推送任何更改之前运行验证脚本。

Agno 模板已预配置了 [ruff](https://docs.astral.sh/ruff/) 和 [mypy](https://mypy.readthedocs.io/en/stable/)，您可以通过辅助脚本或直接运行它们。请查看 `pyproject.toml` 文件以了解配置。

<CodeGroup>
  ```bash terminal theme={null}
  ./scripts/validate.sh
  ```

  ```bash ruff theme={null}
  ruff check .
  ```

  ```bash mypy theme={null}
  mypy .
  ```
</CodeGroup>
