ruff formatting

reformatted due to ruff errors
This commit is contained in:
skunkworxdark 2023-12-06 08:10:22 +00:00
parent 3b4b4ba40a
commit cd15d8b7a9
2 changed files with 12 additions and 11 deletions

View File

@ -14,6 +14,7 @@ def calc_overlap(tiles: list[Tile], num_tiles_x, num_tiles_y) -> list[Tile]:
num_tiles_x: the number of tiles on the x axis. num_tiles_x: the number of tiles on the x axis.
num_tiles_y: the number of tiles on the y axis. num_tiles_y: the number of tiles on the y axis.
""" """
def get_tile_or_none(idx_y: int, idx_x: int) -> Union[Tile, None]: def get_tile_or_none(idx_y: int, idx_x: int) -> Union[Tile, None]:
if idx_y < 0 or idx_y > num_tiles_y or idx_x < 0 or idx_x > num_tiles_x: if idx_y < 0 or idx_y > num_tiles_y or idx_x < 0 or idx_x > num_tiles_x:
return None return None

View File

@ -49,7 +49,7 @@ def paste(dst_image: np.ndarray, src_image: np.ndarray, box: TBLR, mask: Optiona
dst_image[box.top : box.bottom, box.left : box.right] = src_image * mask + dst_image_box * (1.0 - mask) dst_image[box.top : box.bottom, box.left : box.right] = src_image * mask + dst_image_box * (1.0 - mask)
def seam_blend(ia1: np.ndarray, ia2: np.ndarray, blend_amount: int, x_seam: bool,) -> np.ndarray: def seam_blend(ia1: np.ndarray, ia2: np.ndarray, blend_amount: int, x_seam: bool) -> np.ndarray:
"""Blend two overlapping tile sections using a seams to find a path. """Blend two overlapping tile sections using a seams to find a path.
It is assumed that input images will be RGB np arrays and are the same size. It is assumed that input images will be RGB np arrays and are the same size.