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

chore: add type checks for Authorization with new example. #682

Merged
merged 2 commits into from
Dec 4, 2024

Conversation

karel-rehor
Copy link
Contributor

@karel-rehor karel-rehor commented Dec 3, 2024

Closes #680

Proposed Changes

  • Add type checks in constructor of Authorization
    • verify org_id is a string
    • verify permissions is a list
  • Add type check in authorizations_api.create_authorization that argument passed as authorization is of type Authorization.
  • Add examples/authorizations.py

Checklist

  • CHANGELOG.md updated
  • Rebased/mergeable
  • A test has been added if appropriate
  • pytest tests completes successfully
  • Commit messages are conventional
  • Sign CLA (if not already signed)

@karel-rehor karel-rehor requested a review from bednar December 3, 2024 13:57
@codecov-commenter
Copy link

codecov-commenter commented Dec 3, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.36%. Comparing base (2d0adb9) to head (989fb88).
Report is 1 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #682   +/-   ##
=======================================
  Coverage   90.36%   90.36%           
=======================================
  Files          40       40           
  Lines        3539     3541    +2     
=======================================
+ Hits         3198     3200    +2     
  Misses        341      341           

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

@karel-rehor karel-rehor marked this pull request as ready for review December 3, 2024 13:59
Copy link
Contributor

@bednar bednar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add new example to the examples/README.md.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot create authorization token via python client
3 participants