Skip to content

Commit

Permalink
apply pylint suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
ungarj committed Aug 17, 2021
1 parent f2a433a commit 3ed0555
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions mapchete/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ def open(some_input, with_cache=False, fs=None, fs_kwargs=None, **kwargs):
)
kwargs.update(mode="readonly")
return Mapchete(MapcheteConfig(config, **kwargs))
else:
return Mapchete(MapcheteConfig(some_input, **kwargs), with_cache=with_cache)

return Mapchete(MapcheteConfig(some_input, **kwargs), with_cache=with_cache)


class Mapchete(object):
Expand Down Expand Up @@ -155,9 +155,9 @@ def get_process_tiles(self, zoom=None):
):
yield tile
else:
for zoom in reversed(self.config.zoom_levels):
for i in reversed(self.config.zoom_levels):
for tile in self.config.process_pyramid.tiles_from_geom(
self.config.area_at_zoom(zoom), zoom
self.config.area_at_zoom(i), i
):
yield tile

Expand Down Expand Up @@ -236,7 +236,7 @@ def batch_process(
multiprocessing_module=multiprocessing_module or multiprocessing,
multiprocessing_start_method=multiprocessing_start_method,
skip_output_check=skip_output_check,
executor=None,
executor=executor,
)
)

Expand Down Expand Up @@ -329,7 +329,7 @@ def count_tiles(self, minzoom=None, maxzoom=None, init_zoom=0):
self.config.process_pyramid,
minzoom,
maxzoom,
init_zoom=0,
init_zoom=init_zoom,
)
return self._count_tiles_cache[(minzoom, maxzoom)]

Expand Down Expand Up @@ -358,8 +358,7 @@ def execute(self, process_tile, raise_nodata=False):
except MapcheteNodataTile:
if raise_nodata: # pragma: no cover
raise
else:
return self.config.output.empty(process_tile)
return self.config.output.empty(process_tile)

def read(self, output_tile):
"""
Expand Down

0 comments on commit 3ed0555

Please sign in to comment.