Enhance the TypeHints to return actual Models and not ormar.Model
See original GitHub issueAs described in #111 QuerySet
methods should actually return inferred Model subclasses and not the main ormar.Model
.
Since I am not an expert in complex python typing any help appreciated.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Models - ormar - GitHub Pages
By defining an ormar Model you get corresponding Pydantic model as well as ... and do not pass actual value in request you...
Read more >QuerySet operations returns Sequence instead of List #120
The QuerySet operations return value is Sequence["Model"] even ... ormar.models.mixins.merge_mixin.py ==> merge_instances_list class method.
Read more >How do I type hint a method with the type of the enclosing class?
Since Python still is a dynamically typed language so no type-checking is done ... inherited type hints of the return # https://stackoverflow.com/a/64938978 ...
Read more >InCoder: A Generative Model for Code Infilling and Synthesis | DeepAI
Most current image captioning models typically generate captions from le. ... non-None return type hints, and that were not included in our model's...
Read more >What's New In Python 3.7 — Python 3.11.1 documentation
The advent of type hints in Python uncovered two glaring usability issues with the ... of the existing TLS API will be no-op...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@aliakhtar - in 0.10.1 I added
get_or_none()
That’s awesome, and very fast. Thanks!
Almost wish you hadn’t done it so I could send a PR 😛