Skip to content

Commit

Permalink
fix: Replace deprecated 'allow_mutation' with 'frozen' in Pydantic mo…
Browse files Browse the repository at this point in the history
…dels (#107)

Updated the configuration in Pydantic models to use 'frozen' instead of the deprecated 'allow_mutation' to ensure compatibility with Pydantic V2.
  • Loading branch information
BhanuKiranChaluvadi authored Aug 20, 2024
1 parent dedcc94 commit 225305e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions avanza/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class SecretCredentials(BaseCredentials):
totp_secret: str = Field(..., alias="totpSecret")

class Config:
allow_mutation = False
frozen = True

@property
def totp_code(self) -> str:
Expand All @@ -46,7 +46,7 @@ class TokenCredentials(BaseCredentials):
totp_token: str = Field(..., alias="totpToken")

class Config:
allow_mutation = False
frozen = True

@property
def totp_code(self):
Expand Down

0 comments on commit 225305e

Please sign in to comment.