|
1 | 1 | """Core easing annotations and helper functions.""" |
| 2 | + |
2 | 3 | from collections.abc import Callable |
3 | 4 | from math import cos, pi, sin, sqrt, tau |
4 | 5 | from typing import Protocol, TypeVar |
@@ -29,9 +30,7 @@ def f(t: float) -> t: |
29 | 30 | method can be passed as an easing function. |
30 | 31 | """ |
31 | 32 |
|
32 | | - def __call__(self, __t: float) -> float: |
33 | | - ... |
34 | | - |
| 33 | + def __call__(self, __t: float) -> float: ... |
35 | 34 |
|
36 | 35 |
|
37 | 36 | class Animatable(Protocol): |
@@ -59,7 +58,6 @@ class Animatable(Protocol): |
59 | 58 | operator for multiplication. |
60 | 59 | """ |
61 | 60 |
|
62 | | - |
63 | 61 | def __mul__(self: T, other: T | float, /) -> T: ... |
64 | 62 |
|
65 | 63 | def __add__(self: T, other: T | float, /) -> T: ... |
@@ -362,7 +360,6 @@ def lerp(x: float, minimum: A, maximum: A) -> A: |
362 | 360 | return minimum + ((maximum - minimum) * x) |
363 | 361 |
|
364 | 362 |
|
365 | | - |
366 | 363 | def ease( |
367 | 364 | minimum: A, |
368 | 365 | maximum: A, |
@@ -415,12 +412,5 @@ def ease( |
415 | 412 | new_p = func(p) |
416 | 413 | return lerp(new_p, minimum, maximum) |
417 | 414 |
|
418 | | -__all__ = [ |
419 | | - "Animatable", |
420 | | - "Easing", |
421 | | - "EasingFunction", |
422 | | - "ease", |
423 | | - "perc", |
424 | | - "lerp" |
425 | | -] |
426 | 415 |
|
| 416 | +__all__ = ["Animatable", "Easing", "EasingFunction", "ease", "perc", "lerp"] |
0 commit comments