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

Method __deserialize_date

kubernetes/aio/client/api_client.py:639–653  ·  view source on GitHub ↗

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

(self, string)

Source from the content-addressed store, hash-verified

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

Callers 1

__deserializeMethod · 0.95

Calls 1

formatMethod · 0.45

Tested by

no test coverage detected