From 9c971a18f01892c2124c4e7b0e5c4c8fefa8177c Mon Sep 17 00:00:00 2001 From: Frh Date: Sun, 14 Jun 2020 12:36:24 -0700 Subject: [PATCH] Linting --- camelot/core.py | 16 ++++++---------- camelot/utils.py | 2 +- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/camelot/core.py b/camelot/core.py index 51f61f8..9309260 100644 --- a/camelot/core.py +++ b/camelot/core.py @@ -112,7 +112,7 @@ class TextEdge(TextAlignment): self.is_valid = False def __repr__(self): - x = round(self.x, 2) + x = round(self.coord, 2) y0 = round(self.y0, 2) y1 = round(self.y1, 2) return f" 1: # TODO: hacky self._register_textline(tl) @@ -396,14 +393,13 @@ class Cell(): @property def bound(self): - """The number of sides on which the cell is bounded. - """ + """The number of sides on which the cell is bounded.""" return self.top + self.bottom + self.left + self.right class Table(): - """Defines a table with coordinates relative to a left-bottom - origin. (PDF coordinate space) + """Defines a table with coordinates relative to a left-bottom origin. + (PDF coordinate space) Parameters ---------- diff --git a/camelot/utils.py b/camelot/utils.py index f088866..7c202ed 100644 --- a/camelot/utils.py +++ b/camelot/utils.py @@ -812,7 +812,7 @@ def flag_font_size(textline, direction, strip_text=""): def split_textline(table, textline, direction, flag_size=False, strip_text=""): - """Splits PDFMiner LTTextLine into substrings if it spans across + """Split PDFMiner LTTextLine into substrings if it spans across multiple rows/columns. Parameters