diff --git a/LICENSE b/LICENSE index e948859..6ae1c36 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2019-2024, Stéphane Brunner +Copyright (c) 2019-2025, Stéphane Brunner Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/deskew/__init__.py b/deskew/__init__.py index 57ac5aa..2540285 100644 --- a/deskew/__init__.py +++ b/deskew/__init__.py @@ -40,7 +40,6 @@ def determine_skew_dev( ], ]: """Calculate skew angle.""" - num_angles = round(np.pi / min_deviation) imagergb = rgba2rgb(image) if len(image.shape) == 3 and image.shape[2] == 4 else image # type: ignore[no-untyped-call] img = rgb2gray(imagergb) if len(imagergb.shape) == 3 else imagergb @@ -222,7 +221,7 @@ def determine_skew_debug_images( axe.set_axis_off() axe.set_title("Detected lines") - for _, line_angle, dist in zip(*hough_line_peaks_data): + for _, line_angle, dist in zip(*hough_line_peaks_data, strict=False): (coord0x, coord0y) = dist * np.array([np.cos(line_angle), np.sin(line_angle)]) angle2 = ( (line_angle % np.pi - np.pi / 2)