Skip to content

Commit cb917eb

Browse files
committed
refactor: Update project to pass CI linting and formatting issues
1 parent aefd35e commit cb917eb

21 files changed

+33
-47
lines changed

src/workos/_base_client.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
from workos._client_configuration import ClientConfiguration
66
from workos.fga import FGAModule
77
from workos.utils._base_http_client import DEFAULT_REQUEST_TIMEOUT
8-
from workos.utils.http_client import HTTPClient
98
from workos.audit_logs import AuditLogsModule
109
from workos.directory_sync import DirectorySyncModule
1110
from workos.events import EventsModule

src/workos/directory_sync.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ def list_users(
176176
after: Optional[str] = None,
177177
order: PaginationOrder = "desc",
178178
) -> DirectoryUsersListResource:
179-
180179
list_params: DirectoryUserListFilters = {
181180
"limit": limit,
182181
"before": before,
@@ -315,7 +314,6 @@ async def list_users(
315314
after: Optional[str] = None,
316315
order: PaginationOrder = "desc",
317316
) -> DirectoryUsersListResource:
318-
319317
list_params: DirectoryUserListFilters = {
320318
"limit": limit,
321319
"before": before,

src/workos/portal.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Optional, Protocol, Dict, Literal, Union
1+
from typing import Optional, Protocol
22
from workos.types.portal.portal_link import PortalLink
33
from workos.types.portal.portal_link_intent import PortalLinkIntent
44
from workos.types.portal.portal_link_intent_options import IntentOptions
@@ -36,7 +36,6 @@ def generate_link(
3636

3737

3838
class Portal(PortalModule):
39-
4039
_http_client: SyncHTTPClient
4140

4241
def __init__(self, http_client: SyncHTTPClient):

src/workos/types/fga/warnings.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
from typing import Sequence, Union, Any, Dict, Literal
2-
from typing_extensions import Annotated
1+
from typing import Any, Dict, Literal, Sequence, Union
32

43
from pydantic import BeforeValidator
54
from pydantic_core.core_schema import ValidationInfo
5+
from typing_extensions import Annotated
66

77
from workos.types.workos_model import WorkOSModel
88

@@ -12,7 +12,7 @@ class FGABaseWarning(WorkOSModel):
1212
message: str
1313

1414

15-
class MissingContextKeysWarning(FGABaseWarning):
15+
class MissingContextKeysWarning(FGABaseWarning): # type: ignore[override]
1616
code: Literal["missing_context_keys"]
1717
keys: Sequence[str]
1818

src/workos/types/mfa/authentication_factor.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,21 +43,21 @@ class AuthenticationFactorBase(WorkOSModel):
4343
user_id: Optional[str] = None
4444

4545

46-
class AuthenticationFactorTotp(AuthenticationFactorBase):
46+
class AuthenticationFactorTotp(AuthenticationFactorBase): # type: ignore[override]
4747
"""Representation of a MFA Authentication Factor Response as returned by WorkOS through the MFA feature."""
4848

4949
type: TotpAuthenticationFactorType
5050
totp: TotpFactor
5151

5252

53-
class AuthenticationFactorTotpExtended(AuthenticationFactorBase):
53+
class AuthenticationFactorTotpExtended(AuthenticationFactorBase): # type: ignore[override]
5454
"""Representation of a MFA Authentication Factor Response when enrolling an authentication factor."""
5555

5656
type: TotpAuthenticationFactorType
5757
totp: ExtendedTotpFactor
5858

5959

60-
class AuthenticationFactorSms(AuthenticationFactorBase):
60+
class AuthenticationFactorSms(AuthenticationFactorBase): # type: ignore[override]
6161
"""Representation of a SMS Authentication Factor Response as returned by WorkOS through the MFA feature."""
6262

6363
type: SmsAuthenticationFactorType

src/workos/types/user_management/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
from .organization_membership import *
88
from .password_hash_type import *
99
from .password_reset import *
10-
from .user_management_provider_type import *
11-
from .user import *
1210
from .session import *
11+
from .user import *
12+
from .user_management_provider_type import *

src/workos/types/user_management/session.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
from enum import Enum
2-
from typing import Optional, Sequence, TypedDict, Union
3-
4-
from typing_extensions import Literal
2+
from typing import Literal, Optional, Sequence, TypedDict, Union
53

64
from workos.types.user_management.impersonator import Impersonator
75
from workos.types.user_management.user import User

src/workos/types/workos_model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def dict(
1414
by_alias: bool = False,
1515
exclude_unset: bool = False,
1616
exclude_defaults: bool = False,
17-
exclude_none: bool = False
17+
exclude_none: bool = False,
1818
) -> Dict[str, Any]:
1919
return self.model_dump(
2020
include=include,

src/workos/user_management.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from typing import Awaitable, Optional, Protocol, Sequence, Type, Union, cast
22
from urllib.parse import urlencode
3+
34
from workos._client_configuration import ClientConfiguration
45
from workos.session import AsyncSession, Session
56
from workos.types.list_resource import (
@@ -36,19 +37,20 @@
3637
AuthenticateWithTotpParameters,
3738
)
3839
from workos.types.user_management.authentication_response import (
39-
AuthKitAuthenticationResponse,
4040
AuthenticationResponseType,
41+
AuthKitAuthenticationResponse,
4142
)
4243
from workos.types.user_management.list_filters import (
4344
AuthenticationFactorsListFilters,
4445
InvitationsListFilters,
4546
OrganizationMembershipsListFilters,
47+
SessionsListFilters,
4648
UsersListFilters,
4749
)
4850
from workos.types.user_management.password_hash_type import PasswordHashType
4951
from workos.types.user_management.screen_hint import ScreenHintType
50-
from workos.types.user_management.session import SessionConfig
5152
from workos.types.user_management.session import Session as UserManagementSession
53+
from workos.types.user_management.session import SessionConfig
5254
from workos.types.user_management.user_management_provider_type import (
5355
UserManagementProviderType,
5456
)
@@ -57,11 +59,11 @@
5759
from workos.utils.pagination_order import PaginationOrder
5860
from workos.utils.request_helper import (
5961
DEFAULT_LIST_RESPONSE_LIMIT,
60-
RESPONSE_TYPE_CODE,
61-
REQUEST_METHOD_POST,
62-
REQUEST_METHOD_GET,
6362
REQUEST_METHOD_DELETE,
63+
REQUEST_METHOD_GET,
64+
REQUEST_METHOD_POST,
6465
REQUEST_METHOD_PUT,
66+
RESPONSE_TYPE_CODE,
6567
QueryParameters,
6668
RequestHelper,
6769
)
@@ -113,8 +115,6 @@
113115
Invitation, InvitationsListFilters, ListMetadata
114116
]
115117

116-
from workos.types.user_management.list_filters import SessionsListFilters
117-
118118
SessionsListResource = WorkOSListResource[
119119
UserManagementSession, SessionsListFilters, ListMetadata
120120
]

src/workos/utils/request_helper.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515

1616
class RequestHelper:
17-
1817
@classmethod
1918
def build_parameterized_url(cls, url: str, **params: QueryParameterValue) -> str:
2019
escaped_params = {k: urllib.parse.quote(str(v)) for k, v in params.items()}

0 commit comments

Comments
 (0)