Suppress reportlab deprecation warning

This commit is contained in:
James R. Barlow
2024-02-12 01:17:08 -08:00
parent 3b9d4b7f0a
commit 26470fe16a
2 changed files with 5 additions and 6 deletions
+4 -1
View File
@@ -131,7 +131,10 @@ norecursedirs = ["lib", ".pc", ".git", "venv", "output", "cache", "resources"]
testpaths = ["tests"]
addopts = "-n auto"
markers = ["slow"]
filterwarnings = ["ignore:.*XMLParser.*:DeprecationWarning"]
filterwarnings = [
"ignore:.*XMLParser.*:DeprecationWarning",
'ignore:.*ast.NameConstant.*:DeprecationWarning',
]
[tool.mypy]
+1 -5
View File
@@ -4,10 +4,10 @@
from __future__ import annotations
import operator
import warnings
from io import BytesIO
from math import cos, pi, sin
from os import fspath
from subprocess import run
import img2pdf
import pikepdf
@@ -22,10 +22,6 @@ from ocrmypdf.pdfinfo import PdfInfo
from .conftest import check_ocrmypdf, run_ocrmypdf_api
warnings.filterwarnings(
"ignore", category=DeprecationWarning, module="reportlab.lib.rl_safe_eval"
)
# pylintx: disable=unused-variable
RENDERERS = ['hocr', 'sandwich']