We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I expected the following code to work when it comes to typing
from typing import Any, Mapping import jsonschema store: dict[str, Mapping[str, Any]] = {} jsonschema.RefResolver( base_uri=f"file://mypath.json", referrer={}, store=store )
However, this gives an error:
test.py:9: error: Argument "store" to "RefResolver" has incompatible type "Dict[str, Mapping[str, Any]]"; expected "Union[SupportsKeysAndGetItem[str, str], Iterable[Tuple[str, str]]]" [arg-type] Found 1 error in 1 file (checked 1 source file)
defined at https://github.com/python/typeshed/blob/c1d307fc3bf51488b708e1c71334faccba5fd294/stubs/jsonschema/jsonschema/validators.pyi#L66-L80 . It seems incorrect that store is a dict[str, str] type.
store
dict[str, str]
Similarly, referrer is defined as a dict (MutableMapping) but I suspect that could be changed to Mapping (generically).
referrer
dict
MutableMapping
Mapping
The text was updated successfully, but these errors were encountered:
Possibly? Did you mean to file this ticket there?
Sorry, something went wrong.
I wasn't completely sure if this was something you maintained or not - so I wanted to check with the project version before filing with typeshed.
typeshed
No branches or pull requests
I expected the following code to work when it comes to typing
However, this gives an error:
defined at https://github.com/python/typeshed/blob/c1d307fc3bf51488b708e1c71334faccba5fd294/stubs/jsonschema/jsonschema/validators.pyi#L66-L80 . It seems incorrect that
store
is adict[str, str]
type.Similarly,
referrer
is defined as adict
(MutableMapping
) but I suspect that could be changed toMapping
(generically).The text was updated successfully, but these errors were encountered: