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

Possible to add support for types? #103

Open
tylerlaprade opened this issue Feb 1, 2024 · 1 comment · May be fixed by #104
Open

Possible to add support for types? #103

tylerlaprade opened this issue Feb 1, 2024 · 1 comment · May be fixed by #104

Comments

@tylerlaprade
Copy link

I have been enjoying using get_object_or_None all over my project in place of lazy incorrect .first() calls, and it's really great. However, it has the downside of losing the information about the object's type. Pyright tells me the returned type is Unknown | None, even though I know it has to be the corresponding type of the Model | QuerySet | BaseManager that I passed as klass.

image
@skorokithakis
Copy link
Owner

Types are definitely something that need to be added, any contributing PRs are welcome!

@tylerlaprade tylerlaprade linked a pull request Feb 3, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants