-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Is types-jsonschema outdated? #8662
Comments
Yeah, the type for |
Cc. @sirosen, for interest :) |
I agree -- these seem like minor mistakes (and I bet For changing anything from (I'm just getting back to various things from a short break; thanks for the ping!) |
There also seem to be some issues with |
PR welcome :) |
@AlexWaygood I'll try and find some time for this somewhere this weekend. What's the policy for version differences and using internal private modules? |
Great, thank you!
Typeshed only ever has stubs for the latest version of the runtime; we currently don't have the tooling to allow us to do anything else. (Even if we could, it would be something of a maintenance burden to do so...)
We generally don't like to included internal private modules "for completeness' sake". But if a public module imports something from a private module, it's sometimes preferable to stay close to the implementation and include the private module in the stub. This varies from case to case somewhat tbh. |
In this case class A():
def __init__(attr: str | Unset = Unset):
self.attr = attr With |
It looks like we already have
So yeah, I'd just import it from |
I found that the maintainer of I'll update once I know more. Thanks for the explanation anyway Alex! |
Yes, @sirosen has been quite involved with the effort to add type hints to jsonschema! I believe the plan is to develop typeshed's stubs and the upstream annotations in tandem, until jsonschema is ready to add a |
Hmm, the reason why I initially got interested in these stubs is because the stubs added there are incorrect. Most importantly the I'd happily cooperate with adding the stubs to |
I just wanted to chime in to say I am still interested in working on fixing up these stubs, according to the plan which I pitched. I've been juggling various projects and haven't prioritized this one, but I'll make an effort to change that. |
@sirosen What's your reason for doing both an effort in |
@sirosen I just wanted to say thanks, but I hope it doesn't sound like I'm demanding for anything from you. I am still somewhat new to python typing, so I opened this issue because I will assume that other people (esp in Do you have a publicly documented roadmap describing this in |
ref: python-jsonschema/jsonschema#997
I expected the following code to work when it comes to typing
However, this gives an error:
defined at
typeshed/stubs/jsonschema/jsonschema/validators.pyi
Lines 66 to 80 in c1d307f
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: