Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate custom JSON schema for dynamic setting (#9632)
## Summary If you paste in the TOML for our default configuration (from the docs), it's rejected by our JSON Schema: ![Screenshot 2024-01-23 at 10 08 09 PM](https://github.com/astral-sh/ruff/assets/1309177/7b4ea6e8-07db-4590-bd1e-73a01a35d747) It seems like the issue is with: ```toml # Set the line length limit used when formatting code snippets in # docstrings. # # This only has an effect when the `docstring-code-format` setting is # enabled. docstring-code-line-length = "dynamic" ``` Specifically, since that value uses a custom Serde implementation, I guess Schemars bails out? This PR adds a custom representation to allow `"dynamic"` (but no other strings): ![Screenshot 2024-01-23 at 10 27 21 PM](https://github.com/astral-sh/ruff/assets/1309177/ab7809d4-b077-44e9-8f98-ed893aaefe5d) This seems like it should work but I don't have a great way to test it. Closes #9630.
- Loading branch information