From 9d90cadac0f47cebff163d40577ff5dafd5f8d36 Mon Sep 17 00:00:00 2001 From: Vinayak Mehta Date: Thu, 3 Jan 2019 15:47:05 +0530 Subject: [PATCH] Fix variable name --- camelot/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/camelot/utils.py b/camelot/utils.py index d35cab7..3b78d5e 100644 --- a/camelot/utils.py +++ b/camelot/utils.py @@ -295,8 +295,8 @@ def get_rotation(chars, horizontal_text, vertical_text): hlen = len([t for t in horizontal_text if t.get_text().strip()]) vlen = len([t for t in vertical_text if t.get_text().strip()]) if hlen < vlen: - clockwise = sum(t.matrix[1] < 0 and t.matrix[2] > 0 for t in ltchar) - anticlockwise = sum(t.matrix[1] > 0 and t.matrix[2] < 0 for t in ltchar) + clockwise = sum(t.matrix[1] < 0 and t.matrix[2] > 0 for t in chars) + anticlockwise = sum(t.matrix[1] > 0 and t.matrix[2] < 0 for t in chars) rotation = 'anticlockwise' if clockwise < anticlockwise else 'clockwise' return rotation