Skip to content

Commit 317cfb6

Browse files
committed
STY: make mypy ignore import errors
1 parent b4d2d88 commit 317cfb6

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

pypdf/_crypt_providers/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
)
4141
except ImportError:
4242
try:
43-
from pypdf._crypt_providers._cryptography import ( # type: ignore
43+
from pypdf._crypt_providers._cryptography import ( # type: ignore[assignment]
4444
CryptAES,
4545
CryptRC4,
4646
aes_cbc_decrypt,
@@ -51,7 +51,7 @@
5151
rc4_encrypt,
5252
)
5353
except ImportError:
54-
from pypdf._crypt_providers._fallback import ( # type: ignore
54+
from pypdf._crypt_providers._fallback import ( # type: ignore[assignment]
5555
CryptAES,
5656
CryptRC4,
5757
aes_cbc_decrypt,

pypdf/_crypt_providers/_cryptography.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727

2828
import secrets
2929

30-
from cryptography.hazmat.primitives import padding
31-
from cryptography.hazmat.primitives.ciphers.algorithms import AES, ARC4
32-
from cryptography.hazmat.primitives.ciphers.base import Cipher
33-
from cryptography.hazmat.primitives.ciphers.modes import CBC, ECB
30+
from cryptography.hazmat.primitives import padding # type: ignore[import]
31+
from cryptography.hazmat.primitives.ciphers.algorithms import AES, ARC4 # type: ignore[import]
32+
from cryptography.hazmat.primitives.ciphers.base import Cipher # type: ignore[import]
33+
from cryptography.hazmat.primitives.ciphers.modes import CBC, ECB # type: ignore[import]
3434

3535
from pypdf._crypt_providers._base import CryptBase
3636

0 commit comments

Comments
 (0)