Skip to content

Commit

Permalink
Remove incorrect use of typing.Concatenate from rate_functions.py
Browse files Browse the repository at this point in the history
  • Loading branch information
chopan050 committed Jan 2, 2025
1 parent 35e6597 commit 8cce30f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions manim/utils/rate_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,16 @@ def construct(self):

from functools import wraps
from math import sqrt
from typing import Any, Callable, Concatenate, TypeAlias
from typing import Any, Protocol

import numpy as np

from manim.utils.simple_functions import sigmoid

# TODO: rewrite this as a Protocol with ParamSpec when Python 3.9 is out of life
RateFunction: TypeAlias = Callable[Concatenate[float, ...], float]

# TODO: rewrite this to use ParamSpec when Python 3.9 is out of life
class RateFunction(Protocol):
def __call__(self, t: float, *args: Any, **kwargs: Any) -> float: ...

Check notice

Code scanning / CodeQL

Statement has no effect Note

This statement has no effect.


# This is a decorator that makes sure any function it's used on will
Expand Down

0 comments on commit 8cce30f

Please sign in to comment.