diff --git a/src/p2lab/genetic/operations.py b/src/p2lab/genetic/operations.py index a117fc7..ebf814a 100644 --- a/src/p2lab/genetic/operations.py +++ b/src/p2lab/genetic/operations.py @@ -146,7 +146,7 @@ def locus_swap( team2: list[str], num_pokemon: int, allow_all: bool, - locus: int = None, + locus: int | None = None, ) -> tuple(list[str], list[str]): """ A method of performing the crossover. Pick a 'locus' point: this @@ -194,7 +194,7 @@ def slot_swap( team2: list[str], num_pokemon: int, allow_all: bool, - k: int = None, + k: int | None = None, ) -> tuple(list[str], list[str]): """ A method of performing the crossover. This method randomly @@ -294,7 +294,7 @@ def mutate( mutate_prob: float | np.ndarray, pokemon_population: list[str], allow_all: bool, - k: int = None, + k: int | None = None, ): """ A mutation operation. At random, k members of a team are swapped with k @@ -362,7 +362,7 @@ def fitness_mutate( fitness: np.array, pokemon_population: list[str], allow_all: bool, - k: int = None, + k: int | None = None, ): """ A mutation operation. Does the same as regular mutation, except that