Fix jsonschema._format.pyi to match upstream#8673
Conversation
This updates the types in jsonschema._format.pyi to match the upstream source's type hints: https://github.com/python-jsonschema/jsonschema/blob/main/jsonschema/_format.py JSONSchema's typeshed version is 4.15.*: https://github.com/python/typeshed/blob/master/stubs/jsonschema/METADATA.toml which was released two days ago: https://github.com/python-jsonschema/jsonschema/releases/tag/v4.15.0 So the use of master as a reference is not a big concern here.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
The stubtest error is a stubtest bug that's already fixed on mypy master. You'll just need to allowlist it for now, we can remove the allowlist entry as soon as mypy 0.980 is out. |
… update for mypy bug
|
I've added a fix, but also installed https://github.com/python-jsonschema/jsonschema/blob/main/pyproject.toml#L46 as an extras so that theoretically the other |
Seems like that Mypy behavior ended up being a net positive by reducing the usage of stubtest_allowlist for this package :) Thanks for the feedback on that |
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
This updates the types in jsonschema._format.pyi to match the upstream source's type hints:
https://github.com/python-jsonschema/jsonschema/blob/main/jsonschema/_format.py
JSONSchema's typeshed version is 4.15.*:
https://github.com/python/typeshed/blob/master/stubs/jsonschema/METADATA.toml
which was released two days ago:
https://github.com/python-jsonschema/jsonschema/releases/tag/v4.15.0
So the use of master as a reference is not a big concern here.