Skip to content

Commit 8655b7d

Browse files
Revert "Fix warnings in test session and parser"
This reverts the change to the `license` field in `pyproject.toml`. You requested to keep the `license = "MIT"` syntax, as the build error only affects Python 3.8, which is scheduled to be unsupported in the near future.
1 parent 572db02 commit 8655b7d

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

camelot/parsers/hybrid.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,10 @@ def _generate_table(self, table_idx, bbox, cols, rows, **kwargs):
158158
table = parser._generate_table(table_idx, bbox, cols, rows, **kwargs)
159159
# Because hybrid can inject extraneous splits from both lattice and
160160
# network, remove lines / cols that are completely empty.
161-
table.df = table.df.replace("", np.nan)
162-
table.df = table.df.dropna(axis=0, how="all")
163-
table.df = table.df.dropna(axis=1, how="all")
164-
table.df = table.df.replace(np.nan, "")
161+
# drop empty rows
162+
table.df = table.df.loc[~(table.df == "").all(axis=1)]
163+
# drop empty columns
164+
table.df = table.df.loc[:, ~(table.df == "").all(axis=0)]
165165
table.shape = table.df.shape
166166
return table
167167

noxfile.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,20 @@ def tests(session: Session) -> None:
190190
*plot_requires,
191191
)
192192
try:
193-
session.run("coverage", "run", "--parallel", "-m", "pytest", *session.posargs)
193+
session.run(
194+
"coverage",
195+
"run",
196+
"--parallel",
197+
"-m",
198+
"pytest",
199+
*session.posargs,
200+
env={
201+
"PYTHONWARNINGS": (
202+
"ignore:ARC4 has been moved to"
203+
" cryptography.hazmat.decrepit.ciphers.algorithms.ARC4"
204+
)
205+
},
206+
)
194207
finally:
195208
if session.interactive:
196209
session.notify("coverage", posargs=[])

0 commit comments

Comments
 (0)