Method
travel
(
self,
years: int = 0,
months: int = 0,
weeks: int = 0,
days: int = 0,
hours: int = 0,
minutes: int = 0,
seconds: int = 0,
microseconds: int = 0,
*,
freeze: bool = False,
)
Source from the content-addressed store, hash-verified
| 91 | return self |
| 92 | |
| 93 | def travel( |
| 94 | self, |
| 95 | years: int = 0, |
| 96 | months: int = 0, |
| 97 | weeks: int = 0, |
| 98 | days: int = 0, |
| 99 | hours: int = 0, |
| 100 | minutes: int = 0, |
| 101 | seconds: int = 0, |
| 102 | microseconds: int = 0, |
| 103 | *, |
| 104 | freeze: bool = False, |
| 105 | ) -> Self: |
| 106 | self._start(freeze=freeze) |
| 107 | |
| 108 | cast("time_machine.Coordinates", self._coordinates).move_to( |
| 109 | self._datetime_class.now().add( |
| 110 | years=years, |
| 111 | months=months, |
| 112 | weeks=weeks, |
| 113 | days=days, |
| 114 | hours=hours, |
| 115 | minutes=minutes, |
| 116 | seconds=seconds, |
| 117 | microseconds=microseconds, |
| 118 | ) |
| 119 | ) |
| 120 | |
| 121 | return self |
| 122 | |
| 123 | def travel_to(self, dt: DateTime, *, freeze: bool = False) -> Self: |
| 124 | self._start(freeze=freeze) |