diff --git a/fitz/table.py b/fitz/table.py index aae2bd4f7..d42097e88 100644 --- a/fitz/table.py +++ b/fitz/table.py @@ -71,7 +71,6 @@ * external: A bool indicating whether the header is outside the table cells. """ -import inspect import itertools import string from dataclasses import dataclass @@ -1896,7 +1895,7 @@ def make_line(p, p1, p2, clip): items = p["items"] # items in this path # if 'closePath', add a line from last to first point - if p["closePath"] and i[0][0] == "l" and i[-1][0] == "l": + if p["closePath"] and items[0][0] == "l" and items[-1][0] == "l": items.append(("l", items[-1][2], items[0][1])) for i in items: diff --git a/tests/test_flake8.py b/tests/test_flake8.py index a3469c42b..385de10da 100644 --- a/tests/test_flake8.py +++ b/tests/test_flake8.py @@ -54,5 +54,5 @@ def run(command): print(f'test_flake8(): Running: {command}') subprocess.run(command, shell=1, check=1) run(f'pip install flake8') - run(f'flake8 --ignore={ignores} --statistics {root}/src/__init__.py {root}/src/utils.py') + run(f'flake8 --ignore={ignores} --statistics {root}/src/__init__.py {root}/src/utils.py {root}/fitz/table.py') print(f'test_flake8(): flake8 succeeded.')