Skip to content

Commit

Permalink
simplify if-else statement
Browse files Browse the repository at this point in the history
Co-authored-by: Ryan May <rmay31@gmail.com>
  • Loading branch information
lgolston and dopplershift authored Jun 29, 2023
1 parent 2ae7528 commit 44657a3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/cartopy/io/img_tiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,10 +374,10 @@ def __init__(self, style='toner',
# use optional desired_tile_form input if available
# otherwise, use preset value based on the layer name
if desired_tile_form is None:
if not layer_info['opaque']:
desired_tile_form = 'RGBA'
else:
if layer_info['opaque']:
desired_tile_form = 'RGB'
else:
desired_tile_form = 'RGBA'

super().__init__(desired_tile_form=desired_tile_form,
cache=cache)
Expand Down

0 comments on commit 44657a3

Please sign in to comment.