Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jun 3, 2024
1 parent 07ad8e8 commit addf35a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 14 deletions.
6 changes: 2 additions & 4 deletions src/poincare/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,10 @@ def __init__(self, func: Callable[Concatenate[S, P], R]):
self.func = func

@overload
def __get__(self, obj: None, cls: type[S]) -> Callable[P, R]:
...
def __get__(self, obj: None, cls: type[S]) -> Callable[P, R]: ...

@overload
def __get__(self, obj: S, cls: type[S]) -> Callable[P, R]:
...
def __get__(self, obj: S, cls: type[S]) -> Callable[P, R]: ...

def __get__(self, obj, cls): # type: ignore
if obj is None:
Expand Down
6 changes: 2 additions & 4 deletions src/poincare/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,11 @@


class RHS(Protocol):
def __call__(self, t: float, y: Array, p: Array, dy: MutableArray) -> Array:
...
def __call__(self, t: float, y: Array, p: Array, dy: MutableArray) -> Array: ...


class Transform(Protocol):
def __call__(self, t: float, y: Array, p: Array, out: MutableArray) -> Array:
...
def __call__(self, t: float, y: Array, p: Array, out: MutableArray) -> Array: ...


@dataclass(frozen=True, kw_only=True)
Expand Down
3 changes: 1 addition & 2 deletions src/poincare/solvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@


class Solver(Protocol):
def __call__(self, problem: Problem, *, save_at) -> Solution:
...
def __call__(self, problem: Problem, *, save_at) -> Solution: ...


@dataclass
Expand Down
6 changes: 2 additions & 4 deletions src/poincare/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,7 @@ def assign(
default: Initial | Symbol | None = None,
constant: Literal[False] = False,
init: bool = True,
) -> Parameter:
...
) -> Parameter: ...


@overload
Expand All @@ -395,8 +394,7 @@ def assign(
default: Initial | None = None,
constant: Literal[True],
init: bool = True,
) -> Constant:
...
) -> Constant: ...


def assign(*, default=None, constant: bool = False, init: bool = True):
Expand Down

0 comments on commit addf35a

Please sign in to comment.