hybrid_property support
See original GitHub issueHi, I saw the thread a this topic here, but can’t haven’t seen any TODOs in this repo for it, so I’ll go ahead and make one.
We need support to infer types for hybrid_property
similar to property
, returning different types based on whether it’s being accessed on a class or an instance, and support for the @<property>.expression
decorator.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:14
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Hybrid Attributes — SQLAlchemy 2.0 Documentation
“hybrid” means the attribute has distinct behaviors defined at the class level ... New in version 1.2: added support for bulk updates to...
Read more >What is the difference between marital, separate and hybrid ...
Hybrid property includes assets that may have once been separate, but over time has generated income, increased in value and/or is mixed with...
Read more >Equitable Distribution: What is Hybrid Property?
A marital residence is often hybrid property when one party purchased it prior to the marriage with their separate funds, and then the...
Read more >Property Management Services
We take on the responsibility of bringing in new tenants, rent payments, handling maintenance issues, and responding to tenant complaints and concerns. Hybrid...
Read more >How to Support the Hybrid Work Model - CommercialSearch
On day two of CoreNet's Corporate Real Estate Week 2021 several panels addressed the shifts in workforce planning and how landlords and ...
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
If anyone’s reading this and is curious if there’s a quick way to get an easy (but janky) fix here, you can do something like this to basically sub in mypy’s type checking for
property
for yourhybrid_property
s by using a third variable calledtyped_hybrid_property
who’s type changes depending on whether it’s runtime.This also allows mypy to type expression functions, which is nice.
Here we go, this is just about the whole thing, how about this