deepgram / deepgram-python-sdk

Official Python SDK for Deepgram's automated speech recognition APIs.
https://developers.deepgram.com
MIT License
175 stars 47 forks source link

Introduces Linting (pylint) and Static Checking (mypy) for the SDK #411

Closed dvonthenen closed 2 weeks ago

dvonthenen commented 2 weeks ago

Proposed changes

Implements: https://github.com/deepgram/deepgram-python-sdk/issues/390

This PR is pretty large, to say the least, because it introduces linting (using pylint) and static checking (using mypy - previously, I was going to use pyright). To introduce linting and static checking for PRs, you need to fix all of the issues that it flags. This happened to be a lot issues because during the development of v3 of this SDK, style (aka linting) and certain type checks (aka mypy) was lacking intentionally in order to meet the timeline for release. Since python is pretty forgiving in the type check department, we deferred that until now.

The user can test their compliance with pylint and mypy locally by invoking the same process used in the GitHub actions as follows:

GitHub actions run for this PR:

Other notable changes:

NOTES:

Types of changes

What types of changes does your code introduce to the community Python SDK? Put an x in the boxes that apply

Checklist

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

NA