Skip to content

Commit

Permalink
Fix ruff errors
Browse files Browse the repository at this point in the history
  • Loading branch information
nemanja-m committed Aug 7, 2023
1 parent a8ad8b8 commit ee216ea
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions gaps/image_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ class ImageAnalysis(object):
instead of calculating measure again.
Attributes:
dissimilarity_measures Dictionary with cached dissimilarity measures for puzzle pieces
best_match_table Dictionary with best matching piece for each edge and each piece
dissimilarity_measures: Dictionary with cached dissimilarity measures for pieces
best_match_table: Dictionary with best matching piece for each edge and piece
"""

Expand Down
5 changes: 3 additions & 2 deletions gaps/image_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ def flatten_image(image, piece_size, indexed=False):
flattened into list. Each list element is PIECE_SIZE x PIECE_SIZE x 3
:params image: Input image.
:params piece_size: Size of single square piece. Each piece is PIECE_SIZE x PIECE_SIZE
:params indexed: If True list of Pieces with IDs will be returned, otherwise just plain list of ndarray pieces
:params piece_size: Size of single square piece.
:params indexed: If True list of Pieces with IDs will be returned,
otherwise list of ndarray pieces
Usage::
Expand Down
3 changes: 2 additions & 1 deletion gaps/individual.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ def __getitem__(self, key):
def fitness(self):
"""Evaluates fitness value.
Fitness value is calculated as sum of dissimilarity measures between each adjacent pieces.
Fitness value is calculated as sum of dissimilarity measures between
each adjacent pieces.
"""
if self._fitness is None:
Expand Down

0 comments on commit ee216ea

Please sign in to comment.