-
Notifications
You must be signed in to change notification settings - Fork 30
Due date's type is partially unknown in pyright strict mode #193
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
Comments
Hey @AlexZasorin, thanks for reporting! For now, please consider using I'm not exactly sure why this happens, though I suspect there is an issue with dataclass-wizard, with the way we're using it, or a Pyright bug. If you have more insight, do share! In the meantime, I've reported it here. |
Thanks @goncalossilva! Your response is much appreciated. I'll use that type ignore comment for now. Just to test I tried modifying ApiDue = DatePattern["%F"] but I got basically the same error. I also get a similar error trying to access any property typed as |
I don't think that's a pyright issue, since it does static code analysis and is not able to say which type would be actually used without evaluating Python code. The actual type of |
It does require parameters to know what format to deserialize from at least (which is how we use it). My current understanding of this issue is that it sits upstream. If anyone has a suggestion of a change I can make here to mitigate the issue temporarily, I'm all ears. If not, for now, |
Bug description
I'm running into an issue with the
ApiDue
type where pyright (and basedpyright) report it as being partially unknown in strict mode.It's entirely possible that I'm doing something wrong here, or this is an issue with pyright/basedpyright, so apologies if this is better as a question rather than a bug report.
Expected behaviour
I expected that the usage of the
ApiDue
type (e.g.task.due.date
) does not give a partially unknown error in pyright strict mode.Is reproducible
Yes
To reproduce
Steps taken to try to reproduce
N/A
Screenshots
Version information:
Additional information
N/A
The text was updated successfully, but these errors were encountered: