Skip to content

Commit

Permalink
[pre-commit.ci] Fixing issues with pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Dec 20, 2024
1 parent cec5301 commit 7f75723
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions topostats/grains.py
Original file line number Diff line number Diff line change
Expand Up @@ -997,9 +997,7 @@ def vet_class_sizes_single_grain(
continue

lower_threshold, upper_threshold = [
vetting_criteria[1:]
for vetting_criteria in class_size_thresholds
if vetting_criteria[0] == class_index
vetting_criteria[1:] for vetting_criteria in class_size_thresholds if vetting_criteria[0] == class_index
][0]

if lower_threshold is not None:
Expand Down Expand Up @@ -1726,9 +1724,7 @@ def extract_grains_from_full_image_tensor(

# Crop the tensor
# Get the bounding box for the region
flat_bounding_box: tuple[int, int, int, int] = tuple(
flat_region.bbox
) # min_row, min_col, max_row, max_col
flat_bounding_box: tuple[int, int, int, int] = tuple(flat_region.bbox) # min_row, min_col, max_row, max_col

# Pad the mask
padded_flat_bounding_box = pad_bounding_box(
Expand Down

0 comments on commit 7f75723

Please sign in to comment.