MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / normalize_arg

Method normalize_arg

lib/matplotlib/dates.py:1017–1024  ·  view source on GitHub ↗
(arg)

Source from the content-addressed store, hash-verified

1015 # All datetime arguments must be naive. If they are not naive, they are
1016 # converted to the _tzinfo zone before dropping the zone.
1017 def normalize_arg(arg):
1018 if isinstance(arg, datetime.datetime) and arg.tzinfo is not None:
1019 if arg.tzinfo is not self._tzinfo:
1020 arg = arg.astimezone(self._tzinfo)
1021
1022 return arg.replace(tzinfo=None)
1023
1024 return arg
1025
1026 def normalize_args(args, kwargs):
1027 args = tuple(normalize_arg(arg) for arg in args)

Callers

nothing calls this directly

Calls 1

astimezoneMethod · 0.80

Tested by

no test coverage detected