Skip to content

Commit

Permalink
Simplify if loop
Browse files Browse the repository at this point in the history
Co-authored-by: Greg Lucas <[email protected]>
  • Loading branch information
rcomer and greglucas authored Feb 10, 2024
1 parent 9cb91ad commit d942395
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/cartopy/mpl/feature_artist.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,8 @@ def draw(self, renderer, *args, **kwargs):
geom_paths = cpatch.geos_to_path(projected_geom)
if not geom_paths:
continue
elif len(geom_paths) > 1:
geom_path = mpath.Path.make_compound_path(*geom_paths)
else:
geom_path, = geom_paths
# The transform may have split the geometry into two paths, we only want one compound path
geom_path = mpath.Path.make_compound_path(*geom_paths)
mapping[key] = geom_path

if not self._styler:
Expand Down

0 comments on commit d942395

Please sign in to comment.