Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(typing): Resolve misc type ignores in schemapi.py #3545

Merged
merged 6 commits into from
Aug 18, 2024

Conversation

dangotbanned
Copy link
Member

These are all very low-priority, but allows using "python.analysis.typeCheckingMode": "basic" in this module, without any warnings.

Planning to investigate improving the peformance of validation, which will be much easier with a live type checker

@dangotbanned dangotbanned merged commit c7e1e83 into vega:main Aug 18, 2024
13 checks passed
@dangotbanned dangotbanned deleted the schemapi-pyright-ignores branch August 18, 2024 18:19
@binste
Copy link
Contributor

binste commented Aug 19, 2024

Thanks! I've also noticed that validation can take up a significant amount of time in contexts where milliseconds matter such as in web applications. In an application at work, I had to disable validation of charts when it's deployed to production. Maybe there are things in Python we could improve but I think part of it is also just how the jsonschema library works. Curious to see what you find out @dangotbanned! There are other libraries such as https://github.com/horejsek/python-fastjsonschema and https://github.com/Stranger6667/jsonschema-rs but we'd need something which is also available in pyodide and from which we can continue to produce user-friendly error messages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants