MCPcopy Index your code
hub / github.com/python-pendulum/pendulum / __add__

Method __add__

src/pendulum/datetime.py:1237–1245  ·  view source on GitHub ↗
(self, other: datetime.timedelta)

Source from the content-addressed store, hash-verified

1235 return self.diff(other, False)
1236
1237 def __add__(self, other: datetime.timedelta) -> Self:
1238 if not isinstance(other, datetime.timedelta):
1239 return NotImplemented
1240
1241 caller = traceback.extract_stack(limit=2)[0].name
1242 if caller == "astimezone":
1243 return super().__add__(other)
1244
1245 return self._add_timedelta_(other)
1246
1247 def __radd__(self, other: datetime.timedelta) -> Self:
1248 return self.__add__(other)

Callers 1

__radd__Method · 0.95

Calls 1

_add_timedelta_Method · 0.95

Tested by

no test coverage detected