Closed Tenzer closed 1 week ago
[!WARNING]
Walkthrough skipped
File diffs could not be summarized.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
I am going to keep this PR open until I have time to investigate this. I think TYPE_CHECKING
was introduced later in python v3 and need to check if it will work with the versions we support. This would be the ideal fix for this problem.
In the meantime, I am going to just revert and disable the static checking to unblock everyone.
It was added in Python 3.5.2, according to the documentation: https://docs.python.org/3/library/typing.html#typing.TYPE_CHECKING.
Ok. Will give this a ok then. Thanks for the help!
@Tenzer thanks again for the PR. just posted a new release with this fix: https://github.com/deepgram/deepgram-python-sdk/releases/tag/v3.3.1
Thanks! I can see the new version passes tests in our application at least, so that's better than with version 3.3.0 :)
Proposed changes
The import is only used for type checking, so it can instead be put inside an
if TYPE_CHECKING:
block so the optional dependency isn't needed at all times.Types of changes
What types of changes does your code introduce to the community Python SDK? Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.Further comments
Fixes #418.