File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments