Skip to content

Commit 2a23cda

Browse files
style: pre-commit fixes
1 parent 89f0f9b commit 2a23cda

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/p2lab/genetic/operations.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def locus_swap(
146146
team2: list[str],
147147
num_pokemon: int,
148148
allow_all: bool,
149-
locus: int = None,
149+
locus: int | None = None,
150150
) -> tuple(list[str], list[str]):
151151
"""
152152
A method of performing the crossover. Pick a 'locus' point: this
@@ -194,7 +194,7 @@ def slot_swap(
194194
team2: list[str],
195195
num_pokemon: int,
196196
allow_all: bool,
197-
k: int = None,
197+
k: int | None = None,
198198
) -> tuple(list[str], list[str]):
199199
"""
200200
A method of performing the crossover. This method randomly
@@ -294,7 +294,7 @@ def mutate(
294294
mutate_prob: float | np.ndarray,
295295
pokemon_population: list[str],
296296
allow_all: bool,
297-
k: int = None,
297+
k: int | None = None,
298298
):
299299
"""
300300
A mutation operation. At random, k members of a team are swapped with k
@@ -362,7 +362,7 @@ def fitness_mutate(
362362
fitness: np.array,
363363
pokemon_population: list[str],
364364
allow_all: bool,
365-
k: int = None,
365+
k: int | None = None,
366366
):
367367
"""
368368
A mutation operation. Does the same as regular mutation, except that

0 commit comments

Comments
 (0)