Skip to content

Document severity values for the errors config - #5465

Open
i098 wants to merge 1 commit into
meta:mainfrom
i098:fm/oss-b-pyrefly-5418
Open

i098 wants to merge 1 commit into
meta:mainfrom
i098:fm/oss-b-pyrefly-5418

Conversation

@i098

@i098 i098 commented Oct 31, 2026 •

Copy link
Copy Markdown

Summary

The errors option intro says each error kind takes a severity, but its Type line says "boolean representing enabled status". The parser (crates/pyrefly_config/src/error.rs) accepts error, warn, info, hint and ignore as strings as well as booleans.

This lists the severity strings in the Type line and adds a note with an example (bad-return = "warn").

Fixes #5418

  • I am a human, and I fully understand the code I am submitting.

Test Plan

Docs-only change. Ran python3 test.py --no-test --no-tensor-shapes --no-conformance --no-jsonschema --no-extension (passes). Also ran pyrefly check with [errors] bad-return = "warn": the error is reported as a warning, not an error.

I am new to open source, and this pull request was made with AI assistance.

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.
@meta-cla meta-cla Bot added the cla signed label Oct 31, 2026
@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

✅ This PR meets all requirements from our pull request checklist.

Note: this comment updates automatically after changes to the PR. Updates may take up to half an hour.

@meta-codesync

meta-codesync Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

This pull request has been imported. If you are a Meta employee, you can view this in D128766108. (Because this pull request was imported automatically, there will not be any future comments.)

@stroxler stroxler self-assigned this Nov 1, 2026
@stroxler

stroxler commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

This looks good to me. Unfortunately I can't merge it right away - it accidentally got imported before the CLA was signed, which (for reasons involving internal tooling) means I need a stamp from a teammate.

Hopefully we'll get it merged in the next couple of days

@rchen152 rchen152 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review automatically exported from Phabricator review in Meta.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants