MCPcopy Index your code
hub / github.com/kubernetes-client/python / __deserialize_date

Method __deserialize_date

kubernetes/client/api_client.py:633–647  ·  view source on GitHub ↗

Deserializes string to date. :param string: str. :return: date.

(self, string)

Source from the content-addressed store, hash-verified

631 return value
632
633 def __deserialize_date(self, string):
634 """Deserializes string to date.
635
636 :param string: str.
637 :return: date.
638 """
639 try:
640 return parse(string).date()
641 except ImportError:
642 return string
643 except ValueError:
644 raise rest.ApiException(
645 status=0,
646 reason="Failed to parse `{0}` as date object".format(string)
647 )
648
649 def __deserialize_datetime(self, string):
650 """Deserializes string to datetime.

Callers 1

__deserializeMethod · 0.95

Calls 1

formatMethod · 0.45

Tested by

no test coverage detected