From 3a7b9f6564f42d7e35892cf945ddec2b1365bf4f Mon Sep 17 00:00:00 2001 From: Vladimir Iglovikov Date: Fri, 8 Mar 2024 17:08:38 -0800 Subject: [PATCH] Fixes --- albumentations/augmentations/transforms.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/albumentations/augmentations/transforms.py b/albumentations/augmentations/transforms.py index 5a0edba74..2d05bc366 100644 --- a/albumentations/augmentations/transforms.py +++ b/albumentations/augmentations/transforms.py @@ -341,8 +341,10 @@ def __init__( super().__init__(always_apply, p) if not 0 <= snow_point_lower <= snow_point_upper <= 1: - msg = "Invalid combination of snow_point_lower and snow_point_upper. " - f"Got: {(snow_point_lower, snow_point_upper)}" + msg = ( + "Invalid combination of snow_point_lower and snow_point_upper. " + f"Got: {(snow_point_lower, snow_point_upper)}" + ) raise ValueError(msg) if brightness_coeff < 0: raise ValueError(f"brightness_coeff must be greater than 0. Got: {brightness_coeff}") @@ -740,8 +742,10 @@ def __init__( if not 0 <= angle_lower < angle_upper <= 1: raise ValueError(f"Invalid combination of angle_lower nad angle_upper. Got: {(angle_lower, angle_upper)}") if not 0 <= num_flare_circles_lower < num_flare_circles_upper: - msg = "Invalid combination of num_flare_circles_lower nad num_flare_circles_upper. " - f"Got: {(num_flare_circles_lower, num_flare_circles_upper)}" + msg = ( + "Invalid combination of num_flare_circles_lower nad num_flare_circles_upper. " + f"Got: {(num_flare_circles_lower, num_flare_circles_upper)}" + ) raise ValueError(msg) self.flare_center_lower_x = flare_center_lower_x