-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
fix: Improve read_database
check for SQLAlchemy async Session objects
#16680
fix: Improve read_database
check for SQLAlchemy async Session objects
#16680
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good move extracting into a helper function.
It still feels a bit brittle checking for the names of certain types. Perhaps this can be rewritten in the future with a dynamic import of SQLAlchemy and doing proper isinstance
checks?
Actually, that's a good move; let's do it now ;) |
de5ba45
to
0f1477d
Compare
switch name-based type check for isinstance
0f1477d
to
0f27f05
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #16680 +/- ##
==========================================
- Coverage 81.52% 81.48% -0.04%
==========================================
Files 1414 1415 +1
Lines 186398 186656 +258
Branches 3014 3016 +2
==========================================
+ Hits 151957 152102 +145
- Misses 33911 34024 +113
Partials 530 530 ☔ View full report in Codecov by Sentry. |
…ts (pola-rs#16680) (cherry picked from commit 68299b1)
Closes #16616.