Skip to content

Commit a611a36

Browse files
committed
remove runtime_checkable
1 parent 45be43f commit a611a36

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

pypdf/_protocols.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from abc import abstractmethod
44
from pathlib import Path
5-
from typing import IO, Any, Dict, List, Optional, Tuple, Union, runtime_checkable
5+
from typing import IO, Any, Dict, List, Optional, Tuple, Union
66

77
try:
88
# Python 3.8+: https://peps.python.org/pep-0586
@@ -39,7 +39,6 @@ def write_to_stream(
3939
...
4040

4141

42-
@runtime_checkable
4342
class PdfCommonDocProtocol(Protocol):
4443
@property
4544
def pdf_header(self) -> str:
@@ -61,7 +60,6 @@ def strict(self) -> bool:
6160
...
6261

6362

64-
@runtime_checkable
6563
class PdfReaderProtocol(PdfCommonDocProtocol, Protocol):
6664
@property
6765
@abstractmethod
@@ -74,7 +72,6 @@ def trailer(self) -> Dict[str, Any]:
7472
...
7573

7674

77-
@runtime_checkable
7875
class PdfWriterProtocol(PdfCommonDocProtocol, Protocol):
7976
_objects: List[Any]
8077
_id_translated: Dict[int, Dict[int, int]]

0 commit comments

Comments
 (0)