| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
… output JSON Also add tests.
There was a problem hiding this comment.
Nice! Thanks for adding this.
Sorry, something went wrong.
|
Test failure on Python 3.9 seems to be caused by X | Y syntax for unions requires Python 3.10 error, please feel free to merge when you fix it. |
Sorry, something went wrong.
|
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅ |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Work to enable #19697 (see the issue for motivation).
Copy the old serialize methods with some modifications and use them in the export tool. This will let us remove the old serialize and deserialize methods once we drop support for the old JSON serialization format at some point.
This should be enough to support existing use cases that inspect the JSON files. Instead of directly inspecting them, users will have to run the tool first if they use the binary cache format. Example:
The run generates the .mypy_cache/3.13/foobar.data.ff.json file, which is similar to existing to cache json files.
I added some tests and manually checked that the JSON file for builtins module is identical to the one generated by mypy. However, we won't guarantee that all new symbol table or cache features will be added to the exporter, to simplify maintenance. Also I didn't test all features of the exporter in the tests -- I just ensure that the basics work. The tool is primarily there to support existing use cases and debugging workflows, and it would be better to use MypyFile.read(...) in new use cases that require cache inspection.