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

Method __sub__

src/pendulum/duration.py:340–344  ·  view source on GitHub ↗
(self, other: timedelta)

Source from the content-addressed store, hash-verified

338 __radd__ = __add__
339
340 def __sub__(self, other: timedelta) -> Self:
341 if isinstance(other, timedelta):
342 return self.__class__(seconds=self.total_seconds() - other.total_seconds())
343
344 return NotImplemented
345
346 def __neg__(self) -> Self:
347 return self.__class__(

Callers

nothing calls this directly

Calls 1

total_secondsMethod · 0.95

Tested by

no test coverage detected