From c2bfc3e2cdd2ad258b65009f79217992644c9f19 Mon Sep 17 00:00:00 2001 From: "geo-ghci-int[bot]" <146321879+geo-ghci-int[bot]@users.noreply.github.com> Date: Tue, 7 Jan 2025 15:09:29 +0000 Subject: [PATCH] Apply pre-commit fix From the artifact of the previous workflow run --- LICENSE | 2 +- deskew/__init__.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) 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)