Skip to content
This repository was archived by the owner on Apr 2, 2025. It is now read-only.

Commit 0725937

Browse files
committed
Flake8 Fixes on lattice
1 parent 96348f7 commit 0725937

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

camelot/parsers/lattice.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
"""Implementation of the Lattice table parser."""
22

3-
import copy
43
import os
5-
import warnings
6-
7-
import numpy as np
8-
import pandas as pd
94

105
from ..backends.image_conversion import BACKENDS
116
from ..image_processing import adaptive_threshold
@@ -65,12 +60,14 @@ class Lattice(BaseParser):
6560
Size of a pixel neighborhood that is used to calculate a
6661
threshold value for the pixel: 3, 5, 7, and so on.
6762
68-
For more information, refer `OpenCV's adaptiveThreshold <https://docs.opencv.org/2.4/modules/imgproc/doc/miscellaneous_transformations.html#adaptivethreshold>`_.
63+
For more information, refer `OpenCV's adaptiveThreshold
64+
<https://docs.opencv.org/2.4/modules/imgproc/doc/miscellaneous_transformations.html#adaptivethreshold>`_.
6965
threshold_constant : int, optional (default: -2)
7066
Constant subtracted from the mean or weighted mean.
7167
Normally, it is positive but may be zero or negative as well.
7268
73-
For more information, refer `OpenCV's adaptiveThreshold <https://docs.opencv.org/2.4/modules/imgproc/doc/miscellaneous_transformations.html#adaptivethreshold>`_.
69+
For more information, refer `OpenCV's adaptiveThreshold
70+
<https://docs.opencv.org/2.4/modules/imgproc/doc/miscellaneous_transformations.html#adaptivethreshold>`_.
7471
iterations : int, optional (default: 0)
7572
Number of times for erosion/dilation is applied.
7673
@@ -131,14 +128,14 @@ def implements_convert():
131128
if isinstance(backend, str):
132129
if backend not in BACKENDS.keys():
133130
raise NotImplementedError(
134-
f"Unknown backend '{backend}' specified. Please use either 'poppler' or 'ghostscript'."
131+
f"Unknown backend {backend!r} specified. Please use either 'poppler' or 'ghostscript'."
135132
)
136133

137134
return BACKENDS[backend]()
138135
else:
139136
if not implements_convert():
140137
raise NotImplementedError(
141-
f"'{backend}' must implement a 'convert' method"
138+
f"{backend!r} must implement a 'convert' method"
142139
)
143140

144141
return backend

0 commit comments

Comments
 (0)