-
Notifications
You must be signed in to change notification settings - Fork 60
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
Make pymongo optional #126
Conversation
Currently, the way the `pymongo.collection.Collection` is imported, it makes it a hard requirement. Since it's only used for type checking, it's possible to guard this import with `if typing.TYPE_CHECKING:` CC @kkaris
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #126 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 5 5
Lines 509 508 -1
Branches 88 88
=========================================
- Hits 509 508 -1
Continue to review full report in Codecov by Sentry.
|
Nice! This is being released now. |
Released in |
thanks for the quick response @shaypal5. have a nice weekend :) |
Closes #125
Currently, the way the
pymongo.collection.Collection
is imported, it makes it a hard requirement. Since it's only used for type checking, it's possible to guard this import withif typing.TYPE_CHECKING:
and maintain existing functionality.CC @kkaris