Skip to content

Commit

Permalink
Merge pull request #18 from HHousen/deepsource-fix-fbc5b7bd
Browse files Browse the repository at this point in the history
Refactor unnecessary `else` / `elif` when `if` block has a `return` statement
  • Loading branch information
HHousen committed Jul 7, 2021
2 parents fb5421e + 7c3fab2 commit 8368f85
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lecture2notes/end_to_end/figure_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,9 @@ def detect_color_image(image, thumb_size=40, MSE_cutoff=22, adjust_color_bias=Tr
if MSE <= MSE_cutoff:
return "grayscale"
return "color"
elif len(bands) == 1:
if len(bands) == 1:
return "b&w"
else:
return "unknown"
return "unknown"


def convert_coords_to_corners(box):
Expand Down

0 comments on commit 8368f85

Please sign in to comment.