Skip to content

Commit 3bede59

Browse files
authored
Tidy up the notes in the stop_animation docstrings (#3019)
In one case there was a hangover from before we added the `complete` option; in the other two cases it also needed to be made clear that it's only a no-op if there's no animation running or also scheduled.
1 parent 4faa620 commit 3bede59

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

src/textual/_animator.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -476,9 +476,7 @@ async def stop_animation(
476476
complete: Should the animation be set to its final value?
477477
478478
Note:
479-
If there is no animation running, this is a no-op. If there is
480-
an animation running the attribute will be left in the last
481-
state it was in before the call to stop.
479+
If there is no animation scheduled or running, this is a no-op.
482480
"""
483481
key = (id(obj), attribute)
484482
if key in self._scheduled:

src/textual/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ async def stop_animation(self, attribute: str, complete: bool = True) -> None:
609609
complete: Should the animation be set to its final value?
610610
611611
Note:
612-
If there is no animation running, this is a no-op.
612+
If there is no animation scheduled or running, this is a no-op.
613613
"""
614614
await self._animator.stop_animation(self, attribute, complete)
615615

src/textual/widget.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1575,7 +1575,7 @@ async def stop_animation(self, attribute: str, complete: bool = True) -> None:
15751575
complete: Should the animation be set to its final value?
15761576
15771577
Note:
1578-
If there is no animation running, this is a no-op.
1578+
If there is no animation scheduled or running, this is a no-op.
15791579
"""
15801580
await self.app.animator.stop_animation(self, attribute, complete)
15811581

0 commit comments

Comments
 (0)