Skip to content

Commit 5daa5c2

Browse files
committed
change type hint for 'constraints'
1 parent a921f1a commit 5daa5c2

23 files changed

Lines changed: 23 additions & 23 deletions

src/gradient_free_optimizers/optimizer_search/bayesian_optimization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def __init__(
5252
initialize: Dict[
5353
Literal["grid", "vertices", "random", "warm_start"], int | List
5454
] = {"grid": 4, "random": 2, "vertices": 4},
55-
constraints: List[Dict[str, callable]] = [],
55+
constraints: List[callable] = [],
5656
random_state: int = None,
5757
rand_rest_p: float = 0,
5858
nth_process: int = None,

src/gradient_free_optimizers/optimizer_search/differential_evolution.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def __init__(
4747
initialize: Dict[
4848
Literal["grid", "vertices", "random", "warm_start"], int | List
4949
] = {"grid": 4, "random": 2, "vertices": 4},
50-
constraints: List[Dict[str, callable]] = [],
50+
constraints: List[callable] = [],
5151
random_state: int = None,
5252
rand_rest_p: float = 0,
5353
nth_process: int = None,

src/gradient_free_optimizers/optimizer_search/direct_algorithm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def __init__(
4747
initialize: Dict[
4848
Literal["grid", "vertices", "random", "warm_start"], int | List
4949
] = {"grid": 4, "random": 2, "vertices": 4},
50-
constraints: List[Dict[str, callable]] = [],
50+
constraints: List[callable] = [],
5151
random_state: int = None,
5252
rand_rest_p: float = 0,
5353
nth_process: int = None,

src/gradient_free_optimizers/optimizer_search/downhill_simplex.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def __init__(
4747
initialize: Dict[
4848
Literal["grid", "vertices", "random", "warm_start"], int | List
4949
] = {"grid": 4, "random": 2, "vertices": 4},
50-
constraints: List[Dict[str, callable]] = [],
50+
constraints: List[callable] = [],
5151
random_state: int = None,
5252
rand_rest_p: float = 0,
5353
nth_process: int = None,

src/gradient_free_optimizers/optimizer_search/ensemble_optimizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def __init__(
1515
initialize: Dict[
1616
Literal["grid", "vertices", "random", "warm_start"], int | List
1717
] = {"grid": 4, "random": 2, "vertices": 4},
18-
constraints: List[Dict[str, callable]] = [],
18+
constraints: List[callable] = [],
1919
random_state: int = None,
2020
rand_rest_p: float = 0,
2121
nth_process: int = None,

src/gradient_free_optimizers/optimizer_search/evolution_strategy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def __init__(
5353
initialize: Dict[
5454
Literal["grid", "vertices", "random", "warm_start"], int | List
5555
] = {"grid": 4, "random": 2, "vertices": 4},
56-
constraints: List[Dict[str, callable]] = [],
56+
constraints: List[callable] = [],
5757
random_state: int = None,
5858
rand_rest_p: float = 0,
5959
nth_process: int = None,

src/gradient_free_optimizers/optimizer_search/forest_optimization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def __init__(
5353
initialize: Dict[
5454
Literal["grid", "vertices", "random", "warm_start"], int | List
5555
] = {"grid": 4, "random": 2, "vertices": 4},
56-
constraints: List[Dict[str, callable]] = [],
56+
constraints: List[callable] = [],
5757
random_state: int = None,
5858
rand_rest_p: float = 0,
5959
nth_process: int = None,

src/gradient_free_optimizers/optimizer_search/genetic_algorithm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def __init__(
5151
initialize: Dict[
5252
Literal["grid", "vertices", "random", "warm_start"], int | List
5353
] = {"grid": 4, "random": 2, "vertices": 4},
54-
constraints: List[Dict[str, callable]] = [],
54+
constraints: List[callable] = [],
5555
random_state: int = None,
5656
rand_rest_p: float = 0,
5757
nth_process: int = None,

src/gradient_free_optimizers/optimizer_search/grid_search.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def __init__(
4343
initialize: Dict[
4444
Literal["grid", "vertices", "random", "warm_start"], int | List
4545
] = {"grid": 4, "random": 2, "vertices": 4},
46-
constraints: List[Dict[str, callable]] = [],
46+
constraints: List[callable] = [],
4747
random_state: int = None,
4848
rand_rest_p: float = 0,
4949
nth_process: int = None,

src/gradient_free_optimizers/optimizer_search/hill_climbing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def __init__(
4646
initialize: Dict[
4747
Literal["grid", "vertices", "random", "warm_start"], int | List
4848
] = {"grid": 4, "random": 2, "vertices": 4},
49-
constraints: List[Dict[str, callable]] = [],
49+
constraints: List[callable] = [],
5050
random_state: int = None,
5151
rand_rest_p: float = 0,
5252
nth_process: int = None,

0 commit comments

Comments
 (0)