From 2a23cdab364260af19959de6ec12cd2069c6479b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 17 Jul 2023 17:17:07 +0000 Subject: [PATCH] style: pre-commit fixes --- src/p2lab/genetic/operations.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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