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

Add async support for organizations #334

Merged

Conversation

mattgd
Copy link
Contributor

@mattgd mattgd commented Aug 13, 2024

Description

Add async support for organizations. This is the last module I felt like async support could absolutely be useful, in tandem with other modules.

Documentation

Does this require changes to the WorkOS Docs? E.g. the API Reference or code snippets need updates.

[ ] Yes

If yes, link a related docs PR and add a docs maintainer as a reviewer. Their approval is required.

@mattgd mattgd self-assigned this Aug 13, 2024
Copy link

linear bot commented Aug 13, 2024

@mattgd mattgd requested a review from tribble August 13, 2024 22:38
@mattgd mattgd marked this pull request as ready for review August 13, 2024 22:39
@mattgd mattgd requested a review from a team as a code owner August 13, 2024 22:39
@@ -1,11 +1,9 @@
from typing import Generic, Literal, Union
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cleaning up unused imports.

@mattgd mattgd force-pushed the feature/dsync-1816-add-async-support-for-organizations branch from 48aa634 to 5231694 Compare August 14, 2024 16:31
Copy link

@tribble tribble left a comment

Choose a reason for hiding this comment

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

Great Job



@pytest.mark.asyncio
class TestAsyncOrganizations(OrganizationFixtures):
Copy link

Choose a reason for hiding this comment

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

This repetition is so grrrrr.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I know 😢 We need some more thought to strike the right balance between little repetition and and readability.

@@ -75,29 +78,39 @@ def create_organization(
name: str,
domain_data: Optional[Sequence[DomainDataInput]] = None,
idempotency_key: Optional[str] = None,
) -> Organization: ...
) -> SyncOrAsync[Organization]:
"""Create an organization
Copy link

Choose a reason for hiding this comment

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

Odd. I wonder why this is in the diff Is it actually missing?

@mattgd mattgd merged commit 02740dc into beta-5.0 Aug 14, 2024
5 checks passed
@mattgd mattgd deleted the feature/dsync-1816-add-async-support-for-organizations branch August 14, 2024 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants