From d9fc607768de8f585e28e6a2732ecf24df8257b9 Mon Sep 17 00:00:00 2001 From: Mayur Singal <39544459+ulixius9@users.noreply.github.com> Date: Mon, 31 Mar 2025 12:02:32 +0530 Subject: [PATCH] MINOR: Fix python checkstyle (#20489) --- ingestion/src/metadata/ingestion/models/custom_pydantic.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ingestion/src/metadata/ingestion/models/custom_pydantic.py b/ingestion/src/metadata/ingestion/models/custom_pydantic.py index c2ac5a5b810..60f8025f146 100644 --- a/ingestion/src/metadata/ingestion/models/custom_pydantic.py +++ b/ingestion/src/metadata/ingestion/models/custom_pydantic.py @@ -17,7 +17,7 @@ be self-sufficient with only pydantic at import time. """ import json import logging -from typing import Any, Dict, Literal, Optional, Union +from typing import Any, Callable, Dict, Literal, Optional, Union from pydantic import BaseModel as PydanticBaseModel from pydantic import WrapSerializer, model_validator @@ -73,7 +73,7 @@ class BaseModel(PydanticBaseModel): def model_dump_json( # pylint: disable=too-many-arguments self, *, - mask_secrets: bool = None, + mask_secrets: Optional[bool] = None, indent: Optional[int] = None, include: IncEx = None, exclude: IncEx = None, @@ -84,6 +84,7 @@ class BaseModel(PydanticBaseModel): exclude_none: bool = True, round_trip: bool = False, warnings: Union[bool, Literal["none", "warn", "error"]] = True, + fallback: Optional[Callable[[Any], Any]] = None, serialize_as_any: bool = False, ) -> str: """