Skip to content

Conversation

@henryiii
Copy link
Contributor

@henryiii henryiii commented Dec 1, 2023

This is a utility script to generate a JSONSchema file, as PR'd to SchemaStore in SchemaStore/schemastore#3422. Discussion at #16491. Currently, I'm not doing anything locally with the schema file. Ideally, I think it could be saved in mypy/resources/mypy.schema.json. A simple function to retrieve it plus an entry point would allow validate-pyproject to validate the schema file (as done by cibuildwheel & scikit-build-core). I could add a job to verify the rendering stays in sync in CI.

But starting with just the script I used to generate the SchemaStore submission, will take suggestions on what direction to go.

@henryiii
Copy link
Contributor Author

I'll rebase and update in a day or two. :)

@wyattscarpenter
Copy link
Contributor

Well, presumably you know what you're doing and have some git workflow you prefer, so go ahead and do it however you like. But you could also just hit that "accept suggestion" button and see what happens 🚀

(Disclaimer: I'm not a maintainer on this project and all of my suggestions should be interpreted as a guy speculating aimlessly.)

@wyattscarpenter
Copy link
Contributor

I notice you wrote this in 3.10, so as to use match case syntax. That seems fine to me. A good choice, even. However, the type checker is complaining. You could easily silence that with a assert sys.version_info > (3,9) line that will make the type checker just ignore this file in 3.9 mode... except that, unfortunately, match-case syntax specifically breaks that, as a bug #19923

@henryiii
Copy link
Contributor Author

I can do that, but pretty sure I'll need to rerun it too. ;)

henryiii and others added 2 commits September 30, 2025 10:37
@henryiii henryiii force-pushed the henryiii/chore/schema branch from 17cfe52 to 420b6c8 Compare September 30, 2025 14:39
Signed-off-by: Henry Schreiner <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants