Skip to content
This repository has been archived by the owner on Oct 14, 2024. It is now read-only.

fix: makes method private #349

Merged
merged 1 commit into from
Aug 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions kiota_serialization_json/json_parse_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ def _assign_field_values(self, item: U) -> None:
deserialize but the model doesn't support additional data"
)

def is_four_digit_number(self, value: str) -> bool:
def __is_four_digit_number(self, value: str) -> bool:
pattern = r'^\d{4}$'
return bool(re.match(pattern, value))

Expand All @@ -306,7 +306,7 @@ def try_get_anything(self, value: Any) -> Any:
return dict(map(lambda x: (x[0], self.try_get_anything(x[1])), value.items()))
if isinstance(value, str):
try:
if self.is_four_digit_number(value):
if self.__is_four_digit_number(value):
return value

datetime_obj = pendulum.parse(value)
Expand Down