Remove shim for img2pdf < 0.4.4
This commit is contained in:
@@ -19,18 +19,10 @@ from typing import Any, Generic, Sequence, SupportsFloat, SupportsRound, TypeVar
|
||||
|
||||
import img2pdf
|
||||
import pikepdf
|
||||
from packaging.version import Version
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
if Version(img2pdf.__version__) < Version('0.4.0'):
|
||||
IMG2PDF_KWARGS = dict(without_pdfw=True)
|
||||
elif Version(img2pdf.__version__) < Version('0.4.3'):
|
||||
IMG2PDF_KWARGS = dict(engine=img2pdf.Engine.pikepdf)
|
||||
else:
|
||||
IMG2PDF_KWARGS = dict(
|
||||
engine=img2pdf.Engine.pikepdf, rotation=img2pdf.Rotation.ifvalid
|
||||
)
|
||||
IMG2PDF_KWARGS = dict(engine=img2pdf.Engine.pikepdf, rotation=img2pdf.Rotation.ifvalid)
|
||||
|
||||
|
||||
T = TypeVar('T', bound=SupportsRound[Any])
|
||||
|
||||
Reference in New Issue
Block a user