Skip to content

Commit 8b9de7b

Browse files
committed
Fix deprecation warning: pydantic configdict
1 parent 8a8c3a3 commit 8b9de7b

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/codemodder/codetf.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from pathlib import Path
1313
from typing import TYPE_CHECKING, Optional
1414

15-
from pydantic import BaseModel, model_validator
15+
from pydantic import BaseModel, ConfigDict, model_validator
1616

1717
from codemodder import __version__
1818
from codemodder.logging import logger
@@ -138,16 +138,14 @@ class Rule(BaseModel):
138138
name: str
139139
url: Optional[str] = None
140140

141-
class Config:
142-
frozen = True
141+
model_config = ConfigDict(frozen=True)
143142

144143

145144
class Finding(BaseModel):
146145
id: Optional[str] = None
147146
rule: Rule
148147

149-
class Config:
150-
frozen = True
148+
model_config = ConfigDict(frozen=True)
151149

152150
def to_unfixed_finding(
153151
self,

0 commit comments

Comments
 (0)