Skip to content

Commit

Permalink
use import pydantic instead
Browse files Browse the repository at this point in the history
  • Loading branch information
mahsumdemirwb committed Feb 4, 2025
1 parent cabff90 commit afe6144
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions nova/auth/authorization.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import httpx
import asyncio
from pydantic import BaseModel, Field, ValidationError
import pydantic


class Auth0DeviceCodeInfo(BaseModel):
class Auth0DeviceCodeInfo(pydantic.BaseModel):
"""
Model to store device code information.
Expand All @@ -19,10 +19,10 @@ class Auth0DeviceCodeInfo(BaseModel):
user_code: str
verification_uri: str
expires_in: int
interval: int = Field(default=5)
interval: int = pydantic.Field(default=5)


class Auth0TokenInfo(BaseModel):
class Auth0TokenInfo(pydantic.BaseModel):
"""
Model to store token information.
Expand All @@ -35,7 +35,7 @@ class Auth0TokenInfo(BaseModel):
refresh_token: str | None = None


class Auth0Parameters(BaseModel):
class Auth0Parameters(pydantic.BaseModel):
"""
Model to store Auth0 parameters.
Expand Down Expand Up @@ -85,7 +85,7 @@ def __init__(self, auth0_domain: str, auth0_client_id: str, auth0_audience: str)
auth0_client_id=auth0_client_id,
auth0_audience=auth0_audience,
)
except ValidationError as e:
except pydantic.ValidationError as e:
raise ValueError(f"Error: The following parameters are not set correctly: {e}")

self.auth0_domain = auth0_domain
Expand Down

0 comments on commit afe6144

Please sign in to comment.