Skip to content

Commit

Permalink
Pylint compliance
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSkyentist committed Jul 12, 2024
1 parent 2cb2ccc commit af068d6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
9 changes: 6 additions & 3 deletions fitsmap/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,7 @@ def filter_on_extension(

return list(
filter(
lambda s: any((s.endswith(e) for e in extensions))
and not neg_predicate(s),
lambda s: any((s.endswith(e) for e in extensions)) and not neg_predicate(s),
files,
)
)
Expand Down Expand Up @@ -453,7 +452,11 @@ def tile_img(

# if we're using matplotlib we need to instantiate the matplotlib objects
# before we pass them to ray
image_engine = IMG_ENGINE_MPL if (file_location.endswith(".fits") or file_location.endswith(".fits.gz")) else IMG_ENGINE_PIL
image_engine = (
IMG_ENGINE_MPL
if (file_location.endswith(".fits") or file_location.endswith(".fits.gz"))
else IMG_ENGINE_PIL
)
if image_engine == IMG_ENGINE_MPL:
image_norm = norm_kwargs.get(os.path.basename(file_location), norm_kwargs)
mpl_norm, mpl_cmap = build_mpl_objects(array.array, image_norm)
Expand Down
8 changes: 6 additions & 2 deletions fitsmap/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,18 @@ def peek_image_info(img_file_names: List[str]) -> Tuple[int, int]:
fits_sizes = list(
map(
get_fits_image_size,
filter(lambda f: (f.endswith("fits") or f.endswith("fits.gz")), img_file_names),
filter(
lambda f: (f.endswith("fits") or f.endswith("fits.gz")), img_file_names
),
)
)

standard_sizes = list(
map(
get_standard_image_size,
filterfalse(lambda f: (f.endswith("fits") or f.endswith("fits.gz")), img_file_names),
filterfalse(
lambda f: (f.endswith("fits") or f.endswith("fits.gz")), img_file_names
),
)
)

Expand Down

0 comments on commit af068d6

Please sign in to comment.