Skip to content

Commit

Permalink
Reformat... again
Browse files Browse the repository at this point in the history
  • Loading branch information
tribble committed Jul 25, 2024
1 parent 9104475 commit ec1b57c
Show file tree
Hide file tree
Showing 12 changed files with 97 additions and 180 deletions.
30 changes: 10 additions & 20 deletions workos/_base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,41 +19,31 @@ class BaseClient(Protocol):
_http_client: BaseHTTPClient

@property
def audit_logs(self) -> AuditLogsModule:
...
def audit_logs(self) -> AuditLogsModule: ...

@property
def directory_sync(self) -> DirectorySyncModule:
...
def directory_sync(self) -> DirectorySyncModule: ...

@property
def events(self) -> EventsModule:
...
def events(self) -> EventsModule: ...

@property
def mfa(self) -> MFAModule:
...
def mfa(self) -> MFAModule: ...

@property
def organizations(self) -> OrganizationsModule:
...
def organizations(self) -> OrganizationsModule: ...

@property
def passwordless(self) -> PasswordlessModule:
...
def passwordless(self) -> PasswordlessModule: ...

@property
def portal(self) -> PortalModule:
...
def portal(self) -> PortalModule: ...

@property
def sso(self) -> SSOModule:
...
def sso(self) -> SSOModule: ...

@property
def user_management(self) -> UserManagementModule:
...
def user_management(self) -> UserManagementModule: ...

@property
def webhooks(self) -> WebhooksModule:
...
def webhooks(self) -> WebhooksModule: ...
9 changes: 3 additions & 6 deletions workos/audit_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
class AuditLogsModule(Protocol):
def create_event(
self, organization: str, event: dict, idempotency_key: Optional[str] = None
) -> None:
...
) -> None: ...

def create_export(
self,
Expand All @@ -26,11 +25,9 @@ def create_export(
targets=None,
actor_names=None,
actor_ids=None,
) -> WorkOSAuditLogExport:
...
) -> WorkOSAuditLogExport: ...

def get_export(self, export_id) -> WorkOSAuditLogExport:
...
def get_export(self, export_id) -> WorkOSAuditLogExport: ...


class AuditLogs(AuditLogsModule):
Expand Down
21 changes: 7 additions & 14 deletions workos/directory_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ def list_users(
before: Optional[str] = None,
after: Optional[str] = None,
order: PaginationOrder = "desc",
) -> SyncOrAsyncListResource:
...
) -> SyncOrAsyncListResource: ...

def list_groups(
self,
Expand All @@ -62,17 +61,13 @@ def list_groups(
before: Optional[str] = None,
after: Optional[str] = None,
order: PaginationOrder = "desc",
) -> SyncOrAsyncListResource:
...
) -> SyncOrAsyncListResource: ...

def get_user(self, user: str) -> SyncOrAsync[DirectoryUserWithGroups]:
...
def get_user(self, user: str) -> SyncOrAsync[DirectoryUserWithGroups]: ...

def get_group(self, group: str) -> SyncOrAsync[DirectoryGroup]:
...
def get_group(self, group: str) -> SyncOrAsync[DirectoryGroup]: ...

def get_directory(self, directory: str) -> SyncOrAsync[Directory]:
...
def get_directory(self, directory: str) -> SyncOrAsync[Directory]: ...

def list_directories(
self,
Expand All @@ -83,11 +78,9 @@ def list_directories(
after: Optional[str] = None,
organization: Optional[str] = None,
order: PaginationOrder = "desc",
) -> SyncOrAsyncListResource:
...
) -> SyncOrAsyncListResource: ...

def delete_directory(self, directory: str) -> SyncOrAsync[None]:
...
def delete_directory(self, directory: str) -> SyncOrAsync[None]: ...


class DirectorySync(DirectorySyncModule):
Expand Down
3 changes: 1 addition & 2 deletions workos/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ def list_events(
after: Optional[str] = None,
range_start: Optional[str] = None,
range_end: Optional[str] = None,
) -> SyncOrAsync[EventsListResource]:
...
) -> SyncOrAsync[EventsListResource]: ...


class Events(EventsModule):
Expand Down
18 changes: 6 additions & 12 deletions workos/mfa.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,19 @@ def enroll_factor(
totp_issuer=None,
totp_user=None,
phone_number=None,
) -> dict:
...
) -> dict: ...

def get_factor(self, authentication_factor_id=None) -> dict:
...
def get_factor(self, authentication_factor_id=None) -> dict: ...

def delete_factor(self, authentication_factor_id=None) -> None:
...
def delete_factor(self, authentication_factor_id=None) -> None: ...

def challenge_factor(
self, authentication_factor_id=None, sms_template=None
) -> dict:
...
) -> dict: ...

def verify_factor(self, authentication_challenge_id=None, code=None) -> dict:
...
def verify_factor(self, authentication_challenge_id=None, code=None) -> dict: ...

def verify_challenge(self, authentication_challenge_id=None, code=None) -> dict:
...
def verify_challenge(self, authentication_challenge_id=None, code=None) -> dict: ...


class Mfa(MFAModule):
Expand Down
18 changes: 6 additions & 12 deletions workos/organizations.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,33 +31,27 @@ def list_organizations(
before: Optional[str] = None,
after: Optional[str] = None,
order: PaginationOrder = "desc",
) -> WorkOsListResource[Organization, OrganizationListFilters]:
...
) -> WorkOsListResource[Organization, OrganizationListFilters]: ...

def get_organization(self, organization: str) -> Organization:
...
def get_organization(self, organization: str) -> Organization: ...

def get_organization_by_lookup_key(self, lookup_key: str) -> Organization:
...
def get_organization_by_lookup_key(self, lookup_key: str) -> Organization: ...

def create_organization(
self,
name: str,
domain_data: Optional[List[DomainDataInput]] = None,
idempotency_key: Optional[str] = None,
) -> Organization:
...
) -> Organization: ...

def update_organization(
self,
organization: str,
name: str,
domain_data: Optional[List[DomainDataInput]] = None,
) -> Organization:
...
) -> Organization: ...

def delete_organization(self, organization: str) -> None:
...
def delete_organization(self, organization: str) -> None: ...


class Organizations(OrganizationsModule):
Expand Down
6 changes: 2 additions & 4 deletions workos/passwordless.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@


class PasswordlessModule(Protocol):
def create_session(self, session_options: dict) -> dict:
...
def create_session(self, session_options: dict) -> dict: ...

def send_session(self, session_id: str) -> Literal[True]:
...
def send_session(self, session_id: str) -> Literal[True]: ...


class Passwordless(PasswordlessModule):
Expand Down
3 changes: 1 addition & 2 deletions workos/portal.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ def generate_link(
organization: str,
return_url: Optional[str] = None,
success_url: Optional[str] = None,
) -> dict:
...
) -> dict: ...


class Portal(PortalModule):
Expand Down
3 changes: 1 addition & 2 deletions workos/resources/list.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,7 @@ def _parse_params(self):
@abc.abstractmethod
def auto_paging_iter(
self,
) -> Union[AsyncIterator[ListableResource], Iterator[ListableResource]]:
...
) -> Union[AsyncIterator[ListableResource], Iterator[ListableResource]]: ...


class WorkOsListResource(
Expand Down
15 changes: 5 additions & 10 deletions workos/sso.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,11 @@ def get_authorization_url(
self._http_client.base_url, **params
)

def get_profile(self, accessToken: str) -> SyncOrAsync[Profile]:
...
def get_profile(self, accessToken: str) -> SyncOrAsync[Profile]: ...

def get_profile_and_token(self, code: str) -> SyncOrAsync[ProfileAndToken]:
...
def get_profile_and_token(self, code: str) -> SyncOrAsync[ProfileAndToken]: ...

def get_connection(self, connection: str) -> SyncOrAsync[Connection]:
...
def get_connection(self, connection: str) -> SyncOrAsync[Connection]: ...

def list_connections(
self,
Expand All @@ -116,11 +113,9 @@ def list_connections(
before: Optional[str] = None,
after: Optional[str] = None,
order: PaginationOrder = "desc",
) -> SyncOrAsyncListResource:
...
) -> SyncOrAsyncListResource: ...

def delete_connection(self, connection: str) -> SyncOrAsync[None]:
...
def delete_connection(self, connection: str) -> SyncOrAsync[None]: ...


class SSO(SSOModule):
Expand Down
Loading

0 comments on commit ec1b57c

Please sign in to comment.