Skip to content

Commit

Permalink
Bump all libraries
Browse files Browse the repository at this point in the history
and fix new warnings
  • Loading branch information
bansan85 committed Aug 28, 2021
1 parent 1f951f9 commit c1ea27a
Show file tree
Hide file tree
Showing 9 changed files with 149 additions and 139 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/js-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ jobs:
sudo cp js/www/* /var/www/html/
sudo mkdir /var/www/html/diptych/
sudo cp diptych/angle.py diptych/compute.py /var/www/html/diptych/
wget https://github.com/iodide-project/pyodide/releases/download/0.16.1/pyodide-build-0.16.1.tar.bz2
sudo tar -xvf pyodide-build-0.16.1.tar.bz2 -C /var/www/html/
wget https://github.com/pyodide/pyodide/releases/download/0.18.0/pyodide-build-0.18.0.tar.bz2
sudo tar -xvf pyodide-build-0.18.0.tar.bz2 -C /var/www/html/
- name: Test with pytest
run: |
python js/test_selenium.py
8 changes: 4 additions & 4 deletions diptych/crop.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,14 +586,14 @@ def found_data_try2_remove_duplicated_edges(
List[Tuple[Tuple[int, int], Tuple[int, int]]],
List[Tuple[Tuple[int, int], Tuple[int, int]]],
]:
histogram_vertical: Dict[int, int] = dict()
histogram_horizontal: Dict[int, int] = dict()
histogram_vertical: Dict[int, int] = {}
histogram_horizontal: Dict[int, int] = {}
histogram_vertical_points: Dict[
int, Tuple[Tuple[int, int], Tuple[int, int]]
] = dict()
] = {}
histogram_horizontal_points: Dict[
int, Tuple[Tuple[int, int], Tuple[int, int]]
] = dict()
] = {}

for line in lines_vertical_angle:
pt1, pt2 = line
Expand Down
15 changes: 10 additions & 5 deletions diptych/cv2ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ def insert_border_in_mask(
lambda x: (
(x[0][0], x[1][0]),
compute.get_angle_0_180(x[0][0], x[1][0]),
np.linalg.norm(x[0][0] - x[1][0]),
np.linalg.norm(x[0][0] - x[1][0]), # type: ignore
),
all_pair_no_single_pixel,
)
Expand Down Expand Up @@ -896,7 +896,7 @@ def threshold_from_gaussian_histogram_black(


def gaussian_blur_wrap(histogram: np.ndarray, kernel_size: int) -> np.ndarray:
histogram_wrap = np.concatenate(
histogram_wrap = np.concatenate( # type: ignore
[
histogram[-kernel_size:],
histogram,
Expand Down Expand Up @@ -1051,7 +1051,7 @@ def remove_perpendicular_multiples_points(
(c_x, c_y), (c_x + v_x, c_y + v_y), point_i[0]
)
length = int(
np.linalg.norm(
np.linalg.norm( # type: ignore
np.array((c_x, c_y)) - np.array((projection[0], projection[1]))
)
)
Expand Down Expand Up @@ -1081,7 +1081,10 @@ def remove_perpendicular_multiples_points(
10,
flags,
)
if np.linalg.norm(centers[1] - centers[0]) > __max_distance__:
if (
np.linalg.norm(centers[1] - centers[0]) # type: ignore
> __max_distance__
):
del points_dict[key]

list_new_points = []
Expand Down Expand Up @@ -1110,7 +1113,9 @@ def convert_polygon_with_fitline(
if idx1 < idx2:
points = contours[idx1 : idx2 + 1]
else:
points = np.concatenate((contours[idx1:], contours[0 : idx2 + 1]))
points = np.concatenate(
(contours[idx1:], contours[0 : idx2 + 1])
) # type: ignore

new_points = points
all_checksum: List[int] = []
Expand Down
8 changes: 4 additions & 4 deletions diptych/split.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ def __best_candidates_split_line_with_line(
int(
np.ceil(
np.tan(epsilon_angle.get_rad())
* np.linalg.norm(np.array((width, height)))
* np.linalg.norm(np.array((width, height))) # type: ignore
)
)
+ 1
Expand All @@ -513,8 +513,8 @@ def __best_candidates_split_line_with_line(
angle, pos = compute.get_angle_0_180_posx_safe(
(point1_x, point1_y), (point2_x, point2_y)
)
angle_round = int(np.round(angle / epsilon_angle))
pos_round = int(np.round(pos / ecart))
angle_round = int(np.round(angle / epsilon_angle)) # type: ignore
pos_round = int(np.round(pos / ecart)) # type: ignore

min_angle_round = max(angle_round - tolerance, 0)
min_pos_round = max(pos_round - tolerance, 0)
Expand Down Expand Up @@ -818,7 +818,7 @@ def image_with_lines() -> np.ndarray:
lines,
key=lambda x: np.linalg.norm(
np.array((x[0][0], x[0][1])) - np.array((x[1][0], x[1][1]))
),
), # type: ignore
reverse=True,
)
lines_two_longest = lines_sorted_by_length[0:2]
Expand Down
2 changes: 1 addition & 1 deletion diptych/unskew.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def found_angle_unskew_page(
i = int(round(angle / delta_angle.get_deg()))
length = np.linalg.norm(
np.array((line[0], line[1])) - np.array((line[2], line[3]))
)
) # type: ignore
histogram[i] = histogram[i] + length

histogram_blur = cv2ext.gaussian_blur_wrap(histogram, 9)
Expand Down
179 changes: 92 additions & 87 deletions linter-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,29 @@ flake8-bugbear==21.4.3
pyflakes==2.2.0
flake8-import-order==0.18.1
pycodestyle==2.6.0
setuptools==47.1.0
setuptools==56.0.0
git-lint==0.1.2
docopt==0.6.2
docutils==0.17.1
html-linter==0.4.0
docopt==0.6.2
template-remover==0.1.9
docopt==0.6.2
pathlib2==2.3.5
pathlib2==2.3.6
six==1.16.0
PyYAML==5.4.1
template-remover==0.1.9
docopt==0.6.2
termcolor==1.1.0
mypy==0.812
mypy==0.910
mypy-extensions==0.4.3
typed-ast==1.4.3
toml==0.10.2
typing-extensions==3.10.0.0
opencv-python==4.5.2.52
numpy==1.20.3
pipdeptree==2.0.0
pip==21.1.1
prospector==1.3.1
astroid==2.4.1
lazy-object-proxy==1.4.3
six==1.16.0
wrapt==1.12.1
opencv-python==4.5.3.56
numpy==1.21.2
pipdeptree==2.1.0
pip==21.2.4
prospector==1.4.1
dodgy==0.2.1
mccabe==0.6.1
pep8-naming==0.10.0
Expand All @@ -42,123 +38,131 @@ prospector==1.3.1
pycodestyle==2.6.0
pyflakes==2.2.0
pycodestyle==2.6.0
pydocstyle==6.0.0
pydocstyle==6.1.1
snowballstemmer==2.1.0
pyflakes==2.2.0
pylint==2.5.3
astroid==2.4.1
lazy-object-proxy==1.4.3
six==1.16.0
pylint==2.10.2
astroid==2.7.2
lazy-object-proxy==1.6.0
setuptools==56.0.0
wrapt==1.12.1
isort==4.3.21
isort==5.9.3
mccabe==0.6.1
platformdirs==2.2.0
toml==0.10.2
pylint-celery==0.3
astroid==2.4.1
lazy-object-proxy==1.4.3
six==1.16.0
astroid==2.7.2
lazy-object-proxy==1.6.0
setuptools==56.0.0
wrapt==1.12.1
pylint==2.5.3
astroid==2.4.1
lazy-object-proxy==1.4.3
six==1.16.0
pylint==2.10.2
astroid==2.7.2
lazy-object-proxy==1.6.0
setuptools==56.0.0
wrapt==1.12.1
isort==4.3.21
isort==5.9.3
mccabe==0.6.1
platformdirs==2.2.0
toml==0.10.2
pylint-plugin-utils==0.6
pylint==2.5.3
astroid==2.4.1
lazy-object-proxy==1.4.3
six==1.16.0
pylint==2.10.2
astroid==2.7.2
lazy-object-proxy==1.6.0
setuptools==56.0.0
wrapt==1.12.1
isort==4.3.21
isort==5.9.3
mccabe==0.6.1
platformdirs==2.2.0
toml==0.10.2
pylint-django==2.1.0
pylint==2.5.3
astroid==2.4.1
lazy-object-proxy==1.4.3
six==1.16.0
pylint==2.10.2
astroid==2.7.2
lazy-object-proxy==1.6.0
setuptools==56.0.0
wrapt==1.12.1
isort==4.3.21
isort==5.9.3
mccabe==0.6.1
platformdirs==2.2.0
toml==0.10.2
pylint-plugin-utils==0.6
pylint==2.5.3
astroid==2.4.1
lazy-object-proxy==1.4.3
six==1.16.0
pylint==2.10.2
astroid==2.7.2
lazy-object-proxy==1.6.0
setuptools==56.0.0
wrapt==1.12.1
isort==4.3.21
isort==5.9.3
mccabe==0.6.1
platformdirs==2.2.0
toml==0.10.2
pylint-flask==0.6
astroid==2.4.1
lazy-object-proxy==1.4.3
six==1.16.0
astroid==2.7.2
lazy-object-proxy==1.6.0
setuptools==56.0.0
wrapt==1.12.1
pylint==2.5.3
astroid==2.4.1
lazy-object-proxy==1.4.3
six==1.16.0
pylint==2.10.2
astroid==2.7.2
lazy-object-proxy==1.6.0
setuptools==56.0.0
wrapt==1.12.1
isort==4.3.21
isort==5.9.3
mccabe==0.6.1
platformdirs==2.2.0
toml==0.10.2
pylint-plugin-utils==0.6
pylint==2.5.3
astroid==2.4.1
lazy-object-proxy==1.4.3
six==1.16.0
pylint==2.10.2
astroid==2.7.2
lazy-object-proxy==1.6.0
setuptools==56.0.0
wrapt==1.12.1
isort==4.3.21
isort==5.9.3
mccabe==0.6.1
platformdirs==2.2.0
toml==0.10.2
pylint-plugin-utils==0.6
pylint==2.5.3
astroid==2.4.1
lazy-object-proxy==1.4.3
six==1.16.0
pylint==2.10.2
astroid==2.7.2
lazy-object-proxy==1.6.0
setuptools==56.0.0
wrapt==1.12.1
isort==4.3.21
isort==5.9.3
mccabe==0.6.1
platformdirs==2.2.0
toml==0.10.2
PyYAML==5.4.1
requirements-detector==0.7
astroid==2.4.1
lazy-object-proxy==1.4.3
six==1.16.0
astroid==2.7.2
lazy-object-proxy==1.6.0
setuptools==56.0.0
wrapt==1.12.1
setoptconf==0.2.0
pytesseract==0.3.7
Pillow==8.2.0
pytest-cov==2.12.0
pytesseract==0.3.8
Pillow==8.3.1
pytest-cov==2.12.1
coverage==5.5
pytest==6.2.4
attrs==21.2.0
iniconfig==1.1.1
packaging==20.9
packaging==21.0
pyparsing==2.4.7
pluggy==0.13.1
py==1.10.0
toml==0.10.2
toml==0.10.2
pytest-timeout==1.4.2
pytest==6.2.4
attrs==21.2.0
iniconfig==1.1.1
packaging==20.9
packaging==21.0
pyparsing==2.4.7
pluggy==0.13.1
py==1.10.0
toml==0.10.2
pytest-xdist==2.2.1
execnet==1.8.0
apipkg==1.5
pytest-xdist==2.3.0
execnet==1.9.0
pytest==6.2.4
attrs==21.2.0
iniconfig==1.1.1
packaging==20.9
packaging==21.0
pyparsing==2.4.7
pluggy==0.13.1
py==1.10.0
Expand All @@ -168,29 +172,30 @@ pytest-xdist==2.2.1
pytest==6.2.4
attrs==21.2.0
iniconfig==1.1.1
packaging==20.9
packaging==21.0
pyparsing==2.4.7
pluggy==0.13.1
py==1.10.0
toml==0.10.2
safety==1.10.3
click==8.0.0
click==8.0.1
dparse==0.5.1
packaging==20.9
packaging==21.0
pyparsing==2.4.7
PyYAML==5.4.1
toml==0.10.2
packaging==20.9
packaging==21.0
pyparsing==2.4.7
requests==2.25.1
certifi==2020.12.5
chardet==4.0.0
idna==2.10
urllib3==1.26.5
setuptools==47.1.0
scipy==1.6.3
numpy==1.20.3
wheel==0.36.2
yamllint==1.26.1
pathspec==0.8.1
requests==2.26.0
certifi==2021.5.30
charset-normalizer==2.0.4
idna==3.2
urllib3==1.26.6
setuptools==56.0.0
scipy==1.7.1
numpy==1.21.2
wheel==0.37.0
yamllint==1.26.3
pathspec==0.9.0
PyYAML==5.4.1
setuptools==56.0.0
Loading

0 comments on commit c1ea27a

Please sign in to comment.