(self, other)
| 133 | return self.__apply__(other) |
| 134 | |
| 135 | def __sub__(self, other): |
| 136 | if TYPE_CHECKING: |
| 137 | import cftime |
| 138 | else: |
| 139 | cftime = attempt_import("cftime") |
| 140 | |
| 141 | if isinstance(other, cftime.datetime): |
| 142 | raise TypeError("Cannot subtract a cftime.datetime from a time offset.") |
| 143 | elif type(other) is type(self): |
| 144 | return type(self)(self.n - other.n) |
| 145 | else: |
| 146 | return NotImplemented |
| 147 | |
| 148 | def __mul__(self, other: int) -> Self: |
| 149 | if not isinstance(other, int): |
nothing calls this directly
no test coverage detected