From ff628605bd85e54f37b058ca0a9f1227cb897592 Mon Sep 17 00:00:00 2001 From: Jerry Xiao Date: Sat, 31 Oct 2026 02:53:17 +0000 Subject: [PATCH] Document severity values for the errors config The errors option described severity values in its intro but its Type line said boolean only. The parser also accepts the severity strings error, warn, info, hint and ignore, so list them in the Type line and add a note with an example. --- website/docs/configuration.mdx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/website/docs/configuration.mdx b/website/docs/configuration.mdx index 6ff583709a..25c5416da2 100644 --- a/website/docs/configuration.mdx +++ b/website/docs/configuration.mdx @@ -875,7 +875,7 @@ Configure the severity for each kind of error that Pyrefly emits: `error`, `warn Want full type-check squiggles in your editor? Run `pyrefly init` to create a `pyrefly.toml` (or update `pyproject.toml`). ::: -- Type: Table of [error code](./error-kinds.mdx) to boolean representing enabled status +- Type: Table of [error code](./error-kinds.mdx) to a severity (`"error"`, `"warn"`, `"info"`, `"hint"`, or `"ignore"`) or a boolean - Default: `errors = {}`/`[errors]` - Flag equivalent: `--error`, `--warn`, `--ignore` - Equivalent configs: @@ -886,6 +886,8 @@ Want full type-check squiggles in your editor? Run `pyrefly init` to create a `p [`disable_error_code`](https://mypy.readthedocs.io/en/stable/config_file.html#confval-disable_error_code) in mypy - Notes: + - Setting ` = ""` (for example, `bad-return = "warn"`) shows the + error at that severity. - Setting ` = true` means the error will be shown at default severity (or severity `ERROR` if the error is off by default). Setting ` = false` will disable the error for type checking.