Skip to content

Commit 73fa3bd

Browse files
committed
chore: ignore overload for pydantic.create_model
1 parent b03abcf commit 73fa3bd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/fastapi_csrf_protect/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def get_csrf_from_body(self, data: bytes) -> str:
5757
:type data: bytes
5858
"""
5959
fields: dict[str, tuple[type, str]] = {self._token_key: (str, "csrf-token")}
60-
Body = create_model("Body", **fields)
60+
Body = create_model("Body", **fields) # type: ignore[call-overload]
6161
content: str = '{"' + data.decode("utf-8").replace("&", '","').replace("=", '":"') + '"}'
6262
body = Body.model_validate_json(content)
6363
token: str = body.model_dump()[self._token_key]

src/fastapi_csrf_protect/flexible/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def get_csrf_from_body(self, data: bytes) -> str:
6363
:type data: bytes
6464
"""
6565
fields: dict[str, tuple[type, str]] = {self._token_key: (str, "csrf-token")}
66-
Body = create_model("Body", **fields)
66+
Body = create_model("Body", **fields) # type: ignore[call-overload]
6767
content: str = '{"' + data.decode("utf-8").replace("&", '","').replace("=", '":"') + '"}'
6868
body = Body.model_validate_json(content)
6969
token: str = body.model_dump()[self._token_key]

0 commit comments

Comments
 (0)