Skip to content

Commit 734e333

Browse files
committed
no more doc string typing
1 parent 8c17aed commit 734e333

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

arcade/clock.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ class Clock:
1919
only certain elements rather than everything.
2020
2121
Args:
22-
initial_elapsed (float, optional): The amount of time the clock should assume has
22+
initial_elapsed: The amount of time the clock should assume has
2323
already occurred. Defaults to 0.0
24-
initial_tick (int, optional): The number of ticks the clock should assume has already
24+
initial_tick: The number of ticks the clock should assume has already
2525
occurred. Defaults to 0.
26-
tick_speed (float, optional): A multiplier on how the 'speed' of time.
26+
tick_speed: A multiplier on how the 'speed' of time.
2727
i.e. a value of 0.5 means time elapsed half as fast for this clock. Defaults to 1.0.
2828
"""
2929

@@ -40,7 +40,7 @@ def tick(self, delta_time: float):
4040
Update the clock with the time that has passed since the last tick.
4141
4242
Args:
43-
delta_time (float): The amount of time that has passed since the last tick.
43+
delta_time: The amount of time that has passed since the last tick.
4444
"""
4545
self._tick_delta_time = delta_time * self._tick_speed
4646
self._elapsed_time += self._tick_delta_time
@@ -51,7 +51,7 @@ def set_tick_speed(self, new_tick_speed: float):
5151
Set the speed of time for this clock.
5252
5353
Args:
54-
new_tick_speed (float): A multiplier on the 'speed' of time.
54+
new_tick_speed: A multiplier on the 'speed' of time.
5555
i.e. a value of 0.5 means time elapsed half as fast for this clock.
5656
"""
5757
self._tick_speed = new_tick_speed
@@ -61,7 +61,7 @@ def time_since(self, time: float) -> float:
6161
Calculate the amount of time that has passed since the given time.
6262
6363
Args:
64-
time (float): The time to compare against.
64+
time: The time to compare against.
6565
"""
6666
return self._elapsed_time - time
6767

@@ -70,7 +70,7 @@ def ticks_since(self, tick: int) -> int:
7070
Calculate the number of ticks that have occurred since the given tick.
7171
7272
Args:
73-
tick (int): The tick to compare against.
73+
tick: The tick to compare against.
7474
"""
7575
return self._tick - tick
7676

@@ -123,8 +123,8 @@ class FixedClock(Clock):
123123
Arcade provides a global fixed clock which is automatically ticked every update
124124
125125
Args:
126-
sibling (Clock): The unfixed clock which this clock will sync with.
127-
fixed_tick_rate (float, optional): The fixed number of seconds that pass
126+
sibling: The unfixed clock which this clock will sync with.
127+
fixed_tick_rate: The fixed number of seconds that pass
128128
for this clock every tick. Defaults to ``1.0 / 60.0``.
129129
"""
130130

@@ -138,7 +138,7 @@ def set_tick_speed(self, new_tick_speed: float):
138138
Set the speed of time for this clock.
139139
140140
Args:
141-
new_tick_speed (float): A multiplier on the 'speed' of time.
141+
new_tick_speed: A multiplier on the 'speed' of time.
142142
i.e. a value of 0.5 means time elapsed half as fast for this clock
143143
"""
144144
raise ValueError(
@@ -150,7 +150,7 @@ def tick(self, delta_time: float):
150150
Update the clock with the time that has passed since the last tick.
151151
152152
Args:
153-
delta_time (float): The amount of time that has passed since the last tick.
153+
delta_time: The amount of time that has passed since the last tick.
154154
"""
155155
if delta_time != self._fixed_rate:
156156
raise ValueError(
@@ -184,11 +184,11 @@ def _setup_clock(initial_elapsed: float = 0.0, initial_tick: int = 0, tick_speed
184184
Private method used by the arcade window to setup the global clock post initialization.
185185
186186
Args:
187-
initial_elapsed (float, optional): The amount of time the clock should assume
187+
initial_elapsed: The amount of time the clock should assume
188188
has already occurred. Defaults to 0.0
189-
initial_tick (int, optional): The number of ticks the clock should assume has
189+
initial_tick: The number of ticks the clock should assume has
190190
already occurred. Defaults to 0.
191-
tick_speed (float, optional): A multiplier on the 'speed' of time.
191+
tick_speed: A multiplier on the 'speed' of time.
192192
i.e. a value of 0.5 means time elapsed half as fast for this clock.
193193
Defaults to 1.0.
194194
"""
@@ -203,7 +203,7 @@ def _setup_fixed_clock(fixed_tick_rate: float = 1.0 / 60.0):
203203
post initialization.
204204
205205
Args:
206-
fixed_tick_rate (float, optional): The fixed number of seconds that pass
206+
fixed_tick_rate: The fixed number of seconds that pass
207207
for this clock every tick. Defaults to 1.0 / 60.0
208208
"""
209209
GLOBAL_FIXED_CLOCK._elapsed_time = GLOBAL_CLOCK.time # noqa: SLF001

0 commit comments

Comments
 (0)