Skip to content
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

feat: type hinting improvements #167

Merged
merged 2 commits into from
Feb 4, 2025
Merged

Conversation

evansims
Copy link
Member

@evansims evansims commented Jan 30, 2025

Description

This pull request is a first pass at type hinting improvements I'm making to the SDK. This first pass addresses errors in the existing type hints and ensures our client models are fully typed and hinted appropriately.

This pull request adds the mypy static type linter to our build process and an initial configuration for it to the pyproject.toml file. Note that there are a few commented-out flags; I intend to enable these with future passes.

References

This PR is a step towards addressing #109, but further work is required before we can call that closed.

Generated from openfga/sdk-generator#480

Review Checklist

  • I have clicked on "allow edits by maintainers".
  • I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
  • The correct base branch is being used, if not main
  • I have added tests to validate that the change in functionality is working as expected

@evansims evansims added the enhancement New feature or request label Jan 30, 2025
@codecov-commenter
Copy link

codecov-commenter commented Jan 30, 2025

Codecov Report

Attention: Patch coverage is 84.38819% with 148 lines in your changes missing coverage. Please review.

Project coverage is 70.38%. Comparing base (c1339ea) to head (894509a).

Files with missing lines Patch % Lines
openfga_sdk/help.py 0.00% 43 Missing ⚠️
openfga_sdk/telemetry/configuration.py 65.51% 30 Missing ⚠️
openfga_sdk/telemetry/attributes.py 75.00% 15 Missing ⚠️
openfga_sdk/telemetry/metrics.py 55.17% 13 Missing ⚠️
openfga_sdk/rest.py 88.00% 6 Missing ⚠️
openfga_sdk/sync/rest.py 89.79% 5 Missing ⚠️
openfga_sdk/client/models/assertion.py 76.47% 4 Missing ⚠️
...a_sdk/client/models/client_batch_check_response.py 75.00% 4 Missing ⚠️
openfga_sdk/client/models/batch_check_item.py 89.28% 3 Missing ⚠️
openfga_sdk/client/models/write_single_response.py 80.00% 3 Missing ⚠️
... and 15 more

❌ Your project status has failed because the head coverage (70.38%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #167      +/-   ##
==========================================
+ Coverage   69.58%   70.38%   +0.79%     
==========================================
  Files         135      134       -1     
  Lines       10864    10794      -70     
==========================================
+ Hits         7560     7597      +37     
+ Misses       3304     3197     -107     

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

@evansims evansims force-pushed the feat/type-hinting-improvements branch 4 times, most recently from f25d5da to a2849a4 Compare February 3, 2025 16:40
@evansims evansims force-pushed the feat/type-hinting-improvements branch from a2849a4 to 894509a Compare February 3, 2025 17:08
@evansims evansims marked this pull request as ready for review February 4, 2025 01:33
@evansims evansims requested a review from a team as a code owner February 4, 2025 01:33
@evansims evansims added this pull request to the merge queue Feb 4, 2025
Merged via the queue into main with commit 03b0932 Feb 4, 2025
17 checks passed
@evansims evansims deleted the feat/type-hinting-improvements branch February 4, 2025 01:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants