Skip to content

Conversation

@JohananOppongAmoateng
Copy link
Contributor

Closes #505

@codecov
Copy link

codecov bot commented Jan 2, 2026

Codecov Report

❌ Patch coverage is 72.41379% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.12%. Comparing base (e371c50) to head (a86ce68).

Files with missing lines Patch % Lines
src/polymorphic/query_translate.py 72.41% 4 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #788      +/-   ##
==========================================
- Coverage   83.32%   83.12%   -0.21%     
==========================================
  Files          26       26              
  Lines        1637     1659      +22     
  Branches      261      267       +6     
==========================================
+ Hits         1364     1379      +15     
- Misses        207      211       +4     
- Partials       66       69       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bckohan bckohan changed the title can the instance_of Q-object be made to accept a string Allow forward references to models in instance_of queries. Jan 2, 2026
@bckohan bckohan changed the title Allow forward references to models in instance_of queries. Allow forward references in instance_of queries. Jan 2, 2026
@bckohan
Copy link
Collaborator

bckohan commented Jan 3, 2026

@JohananOppongAmoateng can you think of any real use cases that a forward reference would enable? I think the OPs desire in #505 is to put a forward reference in the condition parameter of a Constraint. Unfortunately this solution won't work for them because no polymorphic manager is involved in that scenario.

@bckohan
Copy link
Collaborator

bckohan commented Jan 3, 2026

I'm bumping this to 4.10+ so we can have some time to conjur up a reasonable use case. It seemed simple enough to do but if theres no real need for it then it'd just be more code to maintain.

@JohananOppongAmoateng
Copy link
Contributor Author

@JohananOppongAmoateng can you think of any real use cases that a forward reference would enable? I think the OPs desire in #505 is to put a forward reference in the condition parameter of a Constraint. Unfortunately this solution won't work for them because no polymorphic manager is involved in that scenario.

Cant think of anything

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 this pull request may close these issues.

can the instance_of Q-object be made to accept a string?

2 participants