Skip to content

Commit 466b847

Browse files
committed
Add typing for the new function.
1 parent 0000a4f commit 466b847

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/optimagic/optimizers/scipy_optimizers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
import functools
3737
from dataclasses import dataclass
38-
from typing import Any, Callable, List, Literal, Tuple
38+
from typing import Any, Callable, List, Literal, SupportsInt, Tuple
3939

4040
import numpy as np
4141
import scipy
@@ -693,7 +693,7 @@ def process_scipy_result(scipy_res: ScipyOptimizeResult) -> InternalOptimizeResu
693693
return res
694694

695695

696-
def _int_if_not_none(value):
696+
def _int_if_not_none(value: SupportsInt | None) -> int | None:
697697
if value is None:
698698
return None
699699
return int(value)

0 commit comments

Comments
 (0)