Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor and streamline organization and set base for SDK typing (#284)
* Refactor and streamline organization tests and resources Removed deprecated organization methods and updated organization tests. Also, migrated organization.py to Pydantic models, and added mypy typing for more strict type checking. Additionally, enhance auto-paging to work with new models and restructured fixtures for organization tests. * Switch directories over to new list resources and add typing * Mark version as alpha * Formatting and some type fixes * Add defaults for all optional fields * Type dsync getters * Possible path forward for unknown literal values * Move comments * Export the untyped type and a type guard. Leave a comment about my thoughts on the approach * Test out literals of strings vs enums and factor out types and helpers to a typing directory * Settled on an approach for untyped literals * A little refactoring * More accurate validation for UntypedLiteral * Comments reminding us to clean up * Add typing to the rest of the dsync methods * Just some formattin' * A little more cleanup to unify organizations and dsync * Fix organizations test * DirectorySync tests passing, but still need some cleanup * Do not bump version yet * Formatting * Clean up by removing the enum paths * Small fixed for compat * More formatting and compat * Start fixing dsync tests * Fix another dsync test * Fix more dsync tests * Fix params, optional allows None, instead can force default * Directory sync tests are green * Fix audit logs test * Fix organizations test * Fix auto paging iter tests * Remove debugging print * Fix user management tests * Switch override to typing_extensions * Build fixes. Proper dict override and remove duplicate model key * Add directory sync resource to mypy.ini * Pantera can't spell * Fix type and delete unused fixtures * Remove unused import * Update dsync tests to new pagination helper * Delete unused fixtures * Remove some unneeded comments * PR feedback * Remove trailing comma in mypy.ini --------- Co-authored-by: Peter Arzhintar <[email protected]>
- Loading branch information