Skip to content

Commit

Permalink
Update deprecated Pydantic config
Browse files Browse the repository at this point in the history
Use `ConfigDict` rather than nested class.
  • Loading branch information
jonathan-d-zhang committed Jul 20, 2024
1 parent ad896db commit 8b0547e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/mainframe/models/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from enum import Enum
from typing import Any, Optional

from pydantic import BaseModel, Field, field_serializer
from pydantic import BaseModel, Field, field_serializer, ConfigDict

from .orm import Scan

Expand Down Expand Up @@ -85,12 +85,11 @@ class PackageSpecifier(BaseModel):
version: A str of the package version to scan.
"""

model_config = ConfigDict(frozen=True)

name: str
version: str

class Config:
frozen = True


class ReportPackageBody(PackageSpecifier):
recipient: Optional[str]
Expand Down

0 comments on commit 8b0547e

Please sign in to comment.