Skip to content

Commit

Permalink
style: pre-commit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Jul 10, 2023
1 parent 7694e0b commit 52d1e6b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/p2lab/genetic/operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 52d1e6b

Please sign in to comment.