nwo
stringlengths
10
28
sha
stringlengths
40
40
path
stringlengths
11
97
identifier
stringlengths
1
64
parameters
stringlengths
2
2.24k
return_statement
stringlengths
0
2.17k
docstring
stringlengths
0
5.45k
docstring_summary
stringlengths
0
3.83k
func_begin
int64
1
13.4k
func_end
int64
2
13.4k
function
stringlengths
28
56.4k
url
stringlengths
106
209
project
int64
1
48
executed_lines
list
executed_lines_pc
float64
0
153
missing_lines
list
missing_lines_pc
float64
0
100
covered
bool
2 classes
filecoverage
float64
2.53
100
function_lines
int64
2
1.46k
mccabe
int64
1
253
coverage
float64
0
100
docstring_lines
int64
0
112
function_nodoc
stringlengths
9
56.4k
id
int64
0
29.8k
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/_merger.py
PdfMerger.addBookmark
( self, title: str, pagenum: int, # deprecated, but the whole method is deprecated parent: Union[None, TreeObject, IndirectObject] = None, color: Optional[Tuple[float, float, float]] = None, bold: bool = False, italic: bool = False, fit: FitType = "/Fit", *args: ZoomArgType, )
return self.add_outline_item( title, pagenum, parent, color, bold, italic, Fit(fit_type=fit, fit_args=args), )
.. deprecated:: 1.28.0 Use :meth:`add_outline_item` instead.
.. deprecated:: 1.28.0 Use :meth:`add_outline_item` instead.
735
759
def addBookmark( self, title: str, pagenum: int, # deprecated, but the whole method is deprecated parent: Union[None, TreeObject, IndirectObject] = None, color: Optional[Tuple[float, float, float]] = None, bold: bool = False, italic: bool = False, fit: FitType = "/Fit", *args: ZoomArgType, ) -> IndirectObject: # deprecated """ .. deprecated:: 1.28.0 Use :meth:`add_outline_item` instead. """ deprecation_with_replacement("addBookmark", "add_outline_item", "3.0.0") return self.add_outline_item( title, pagenum, parent, color, bold, italic, Fit(fit_type=fit, fit_args=args), )
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/_merger.py#L735-L759
39
[]
0
[]
0
false
95.477387
25
1
100
2
def addBookmark( self, title: str, pagenum: int, # deprecated, but the whole method is deprecated parent: Union[None, TreeObject, IndirectObject] = None, color: Optional[Tuple[float, float, float]] = None, bold: bool = False, italic: bool = False, fit: FitType = "/Fit", *args: ZoomArgType, ) -> IndirectObject: # deprecated deprecation_with_replacement("addBookmark", "add_outline_item", "3.0.0") return self.add_outline_item( title, pagenum, parent, color, bold, italic, Fit(fit_type=fit, fit_args=args), )
24,454
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/_merger.py
PdfMerger.add_bookmark
( self, title: str, pagenum: int, # deprecated, but the whole method is deprecated already parent: Union[None, TreeObject, IndirectObject] = None, color: Optional[Tuple[float, float, float]] = None, bold: bool = False, italic: bool = False, fit: FitType = "/Fit", *args: ZoomArgType, )
return self.add_outline_item( title, pagenum, parent, color, bold, italic, Fit(fit_type=fit, fit_args=args), )
.. deprecated:: 2.9.0 Use :meth:`add_outline_item` instead.
.. deprecated:: 2.9.0 Use :meth:`add_outline_item` instead.
761
785
def add_bookmark( self, title: str, pagenum: int, # deprecated, but the whole method is deprecated already parent: Union[None, TreeObject, IndirectObject] = None, color: Optional[Tuple[float, float, float]] = None, bold: bool = False, italic: bool = False, fit: FitType = "/Fit", *args: ZoomArgType, ) -> IndirectObject: # deprecated """ .. deprecated:: 2.9.0 Use :meth:`add_outline_item` instead. """ deprecation_with_replacement("addBookmark", "add_outline_item", "3.0.0") return self.add_outline_item( title, pagenum, parent, color, bold, italic, Fit(fit_type=fit, fit_args=args), )
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/_merger.py#L761-L785
39
[]
0
[]
0
false
95.477387
25
1
100
2
def add_bookmark( self, title: str, pagenum: int, # deprecated, but the whole method is deprecated already parent: Union[None, TreeObject, IndirectObject] = None, color: Optional[Tuple[float, float, float]] = None, bold: bool = False, italic: bool = False, fit: FitType = "/Fit", *args: ZoomArgType, ) -> IndirectObject: # deprecated deprecation_with_replacement("addBookmark", "add_outline_item", "3.0.0") return self.add_outline_item( title, pagenum, parent, color, bold, italic, Fit(fit_type=fit, fit_args=args), )
24,455
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/_merger.py
PdfMerger.addNamedDestination
(self, title: str, pagenum: int)
return self.add_named_destination(title, pagenum)
.. deprecated:: 1.28.0 Use :meth:`add_named_destination` instead.
.. deprecated:: 1.28.0 Use :meth:`add_named_destination` instead.
787
795
def addNamedDestination(self, title: str, pagenum: int) -> None: # deprecated """ .. deprecated:: 1.28.0 Use :meth:`add_named_destination` instead. """ deprecation_with_replacement( "addNamedDestination", "add_named_destination", "3.0.0" ) return self.add_named_destination(title, pagenum)
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/_merger.py#L787-L795
39
[]
0
[]
0
false
95.477387
9
1
100
2
def addNamedDestination(self, title: str, pagenum: int) -> None: # deprecated deprecation_with_replacement( "addNamedDestination", "add_named_destination", "3.0.0" ) return self.add_named_destination(title, pagenum)
24,456
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/_merger.py
PdfMerger.add_named_destination
( self, title: str, page_number: Optional[int] = None, pagenum: Optional[int] = None, )
Add a destination to the output. Args: title: Title to use page_number: Page number this destination points at.
Add a destination to the output.
797
832
def add_named_destination( self, title: str, page_number: Optional[int] = None, pagenum: Optional[int] = None, ) -> None: """ Add a destination to the output. Args: title: Title to use page_number: Page number this destination points at. """ if page_number is not None and pagenum is not None: raise ValueError( "The argument pagenum of add_named_destination is deprecated. Use page_number only." ) if pagenum is not None: old_term = "pagenum" new_term = "page_number" warnings.warn( ( f"{old_term} is deprecated as an argument and will be " f"removed in pypdf==4.0.0. Use {new_term} instead" ), DeprecationWarning, ) page_number = pagenum if page_number is None: raise ValueError("page_number may not be None") dest = Destination( TextStringObject(title), NumberObject(page_number), Fit.fit_horizontally(top=826), ) self.named_dests.append(dest)
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/_merger.py#L797-L832
39
[ 0, 12, 13, 14, 15, 16, 17, 28, 30, 31, 32, 33, 34, 35 ]
41.176471
[ 18, 19, 27, 29 ]
11.764706
false
95.477387
36
5
88.235294
5
def add_named_destination( self, title: str, page_number: Optional[int] = None, pagenum: Optional[int] = None, ) -> None: if page_number is not None and pagenum is not None: raise ValueError( "The argument pagenum of add_named_destination is deprecated. Use page_number only." ) if pagenum is not None: old_term = "pagenum" new_term = "page_number" warnings.warn( ( f"{old_term} is deprecated as an argument and will be " f"removed in pypdf==4.0.0. Use {new_term} instead" ), DeprecationWarning, ) page_number = pagenum if page_number is None: raise ValueError("page_number may not be None") dest = Destination( TextStringObject(title), NumberObject(page_number), Fit.fit_horizontally(top=826), ) self.named_dests.append(dest)
24,457
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/_merger.py
PdfFileMerger.__init__
(self, *args: Any, **kwargs: Any)
836
841
def __init__(self, *args: Any, **kwargs: Any) -> None: deprecation_with_replacement("PdfFileMerger", "PdfMerger", "3.0.0") if "strict" not in kwargs and len(args) < 1: kwargs["strict"] = True # maintain the default super().__init__(*args, **kwargs)
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/_merger.py#L836-L841
39
[]
0
[]
0
false
95.477387
6
3
100
0
def __init__(self, *args: Any, **kwargs: Any) -> None: deprecation_with_replacement("PdfFileMerger", "PdfMerger", "3.0.0") if "strict" not in kwargs and len(args) < 1: kwargs["strict"] = True # maintain the default super().__init__(*args, **kwargs)
24,458
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/_codecs/adobe_glyphs.py
_complete
()
13,430
13,434
def _complete() -> None: global adobe_glyphs for i in range(256): adobe_glyphs[f"/a{i}"] = chr(i) adobe_glyphs["/.notdef"] = "□"
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/_codecs/adobe_glyphs.py#L13430-L13434
39
[ 0, 2, 3, 4 ]
80
[]
0
false
100
5
2
100
0
def _complete() -> None: global adobe_glyphs for i in range(256): adobe_glyphs[f"/a{i}"] = chr(i) adobe_glyphs["/.notdef"] = "□"
24,459
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/_codecs/__init__.py
fill_from_encoding
(enc: str)
return lst
10
17
def fill_from_encoding(enc: str) -> List[str]: lst: List[str] = [] for x in range(256): try: lst += (bytes((x,)).decode(enc),) except Exception: lst += (chr(x),) return lst
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/_codecs/__init__.py#L10-L17
39
[ 0, 1, 2, 3, 4, 5, 6, 7 ]
100
[]
0
true
100
8
3
100
0
def fill_from_encoding(enc: str) -> List[str]: lst: List[str] = [] for x in range(256): try: lst += (bytes((x,)).decode(enc),) except Exception: lst += (chr(x),) return lst
24,460
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/_codecs/__init__.py
rev_encoding
(enc: List[str])
return rev
20
28
def rev_encoding(enc: List[str]) -> Dict[str, int]: rev: Dict[str, int] = {} for i in range(256): char = enc[i] if char == "\u0000": continue assert char not in rev, f"{char} at {i} already at {rev[char]}" rev[char] = i return rev
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/_codecs/__init__.py#L20-L28
39
[ 0, 1, 2, 3, 4, 5, 6, 7, 8 ]
100
[]
0
true
100
9
4
100
0
def rev_encoding(enc: List[str]) -> Dict[str, int]: rev: Dict[str, int] = {} for i in range(256): char = enc[i] if char == "\u0000": continue assert char not in rev, f"{char} at {i} already at {rev[char]}" rev[char] = i return rev
24,461
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.__init__
( self, arr: Union["RectangleObject", Tuple[float, float, float, float]] )
19
25
def __init__( self, arr: Union["RectangleObject", Tuple[float, float, float, float]] ) -> None: # must have four points assert len(arr) == 4 # automatically convert arr[x] into NumberObject(arr[x]) if necessary ArrayObject.__init__(self, [self._ensure_is_number(x) for x in arr])
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L19-L25
39
[ 0, 3, 4, 5, 6 ]
71.428571
[]
0
false
100
7
3
100
0
def __init__( self, arr: Union["RectangleObject", Tuple[float, float, float, float]] ) -> None: # must have four points assert len(arr) == 4 # automatically convert arr[x] into NumberObject(arr[x]) if necessary ArrayObject.__init__(self, [self._ensure_is_number(x) for x in arr])
24,462
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject._ensure_is_number
(self, value: Any)
return value
27
30
def _ensure_is_number(self, value: Any) -> Union[FloatObject, NumberObject]: if not isinstance(value, (NumberObject, FloatObject)): value = FloatObject(value) return value
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L27-L30
39
[ 0, 1, 2, 3 ]
100
[]
0
true
100
4
2
100
0
def _ensure_is_number(self, value: Any) -> Union[FloatObject, NumberObject]: if not isinstance(value, (NumberObject, FloatObject)): value = FloatObject(value) return value
24,463
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.scale
(self, sx: float, sy: float)
return RectangleObject( ( float(self.left) * sx, float(self.bottom) * sy, float(self.right) * sx, float(self.top) * sy, ) )
32
40
def scale(self, sx: float, sy: float) -> "RectangleObject": return RectangleObject( ( float(self.left) * sx, float(self.bottom) * sy, float(self.right) * sx, float(self.top) * sy, ) )
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L32-L40
39
[ 0, 1 ]
22.222222
[]
0
false
100
9
1
100
0
def scale(self, sx: float, sy: float) -> "RectangleObject": return RectangleObject( ( float(self.left) * sx, float(self.bottom) * sy, float(self.right) * sx, float(self.top) * sy, ) )
24,464
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.ensureIsNumber
( self, value: Any )
return self._ensure_is_number(value)
42
46
def ensureIsNumber( self, value: Any ) -> Union[FloatObject, NumberObject]: # deprecated deprecation_no_replacement("ensureIsNumber", "3.0.0") return self._ensure_is_number(value)
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L42-L46
39
[]
0
[]
0
false
100
5
1
100
0
def ensureIsNumber( self, value: Any ) -> Union[FloatObject, NumberObject]: # deprecated deprecation_no_replacement("ensureIsNumber", "3.0.0") return self._ensure_is_number(value)
24,465
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.__repr__
(self)
return f"RectangleObject({repr(list(self))})"
48
49
def __repr__(self) -> str: return f"RectangleObject({repr(list(self))})"
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L48-L49
39
[]
0
[]
0
false
100
2
1
100
0
def __repr__(self) -> str: return f"RectangleObject({repr(list(self))})"
24,466
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.left
(self)
return self[0]
52
53
def left(self) -> FloatObject: return self[0]
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L52-L53
39
[ 0, 1 ]
100
[]
0
true
100
2
1
100
0
def left(self) -> FloatObject: return self[0]
24,467
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.left
(self, f: float)
56
57
def left(self, f: float) -> None: self[0] = FloatObject(f)
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L56-L57
39
[ 0, 1 ]
100
[]
0
true
100
2
1
100
0
def left(self, f: float) -> None: self[0] = FloatObject(f)
24,468
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.bottom
(self)
return self[1]
60
61
def bottom(self) -> FloatObject: return self[1]
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L60-L61
39
[ 0, 1 ]
100
[]
0
true
100
2
1
100
0
def bottom(self) -> FloatObject: return self[1]
24,469
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.bottom
(self, f: float)
64
65
def bottom(self, f: float) -> None: self[1] = FloatObject(f)
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L64-L65
39
[ 0, 1 ]
100
[]
0
true
100
2
1
100
0
def bottom(self, f: float) -> None: self[1] = FloatObject(f)
24,470
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.right
(self)
return self[2]
68
69
def right(self) -> FloatObject: return self[2]
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L68-L69
39
[ 0, 1 ]
100
[]
0
true
100
2
1
100
0
def right(self) -> FloatObject: return self[2]
24,471
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.right
(self, f: float)
72
73
def right(self, f: float) -> None: self[2] = FloatObject(f)
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L72-L73
39
[ 0, 1 ]
100
[]
0
true
100
2
1
100
0
def right(self, f: float) -> None: self[2] = FloatObject(f)
24,472
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.top
(self)
return self[3]
76
77
def top(self) -> FloatObject: return self[3]
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L76-L77
39
[ 0, 1 ]
100
[]
0
true
100
2
1
100
0
def top(self) -> FloatObject: return self[3]
24,473
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.top
(self, f: float)
80
81
def top(self, f: float) -> None: self[3] = FloatObject(f)
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L80-L81
39
[ 0, 1 ]
100
[]
0
true
100
2
1
100
0
def top(self, f: float) -> None: self[3] = FloatObject(f)
24,474
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.getLowerLeft_x
(self)
return self.left
83
85
def getLowerLeft_x(self) -> FloatObject: # deprecated deprecation_with_replacement("getLowerLeft_x", "left", "3.0.0") return self.left
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L83-L85
39
[]
0
[]
0
false
100
3
1
100
0
def getLowerLeft_x(self) -> FloatObject: # deprecated deprecation_with_replacement("getLowerLeft_x", "left", "3.0.0") return self.left
24,475
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.getLowerLeft_y
(self)
return self.bottom
87
89
def getLowerLeft_y(self) -> FloatObject: # deprecated deprecation_with_replacement("getLowerLeft_y", "bottom", "3.0.0") return self.bottom
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L87-L89
39
[]
0
[]
0
false
100
3
1
100
0
def getLowerLeft_y(self) -> FloatObject: # deprecated deprecation_with_replacement("getLowerLeft_y", "bottom", "3.0.0") return self.bottom
24,476
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.getUpperRight_x
(self)
return self.right
91
93
def getUpperRight_x(self) -> FloatObject: # deprecated deprecation_with_replacement("getUpperRight_x", "right", "3.0.0") return self.right
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L91-L93
39
[]
0
[]
0
false
100
3
1
100
0
def getUpperRight_x(self) -> FloatObject: # deprecated deprecation_with_replacement("getUpperRight_x", "right", "3.0.0") return self.right
24,477
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.getUpperRight_y
(self)
return self.top
95
97
def getUpperRight_y(self) -> FloatObject: # deprecated deprecation_with_replacement("getUpperRight_y", "top", "3.0.0") return self.top
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L95-L97
39
[]
0
[]
0
false
100
3
1
100
0
def getUpperRight_y(self) -> FloatObject: # deprecated deprecation_with_replacement("getUpperRight_y", "top", "3.0.0") return self.top
24,478
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.getUpperLeft_x
(self)
return self.left
99
101
def getUpperLeft_x(self) -> FloatObject: # deprecated deprecation_with_replacement("getUpperLeft_x", "left", "3.0.0") return self.left
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L99-L101
39
[]
0
[]
0
false
100
3
1
100
0
def getUpperLeft_x(self) -> FloatObject: # deprecated deprecation_with_replacement("getUpperLeft_x", "left", "3.0.0") return self.left
24,479
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.getUpperLeft_y
(self)
return self.top
103
105
def getUpperLeft_y(self) -> FloatObject: # deprecated deprecation_with_replacement("getUpperLeft_y", "top", "3.0.0") return self.top
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L103-L105
39
[]
0
[]
0
false
100
3
1
100
0
def getUpperLeft_y(self) -> FloatObject: # deprecated deprecation_with_replacement("getUpperLeft_y", "top", "3.0.0") return self.top
24,480
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.getLowerRight_x
(self)
return self.right
107
109
def getLowerRight_x(self) -> FloatObject: # deprecated deprecation_with_replacement("getLowerRight_x", "right", "3.0.0") return self.right
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L107-L109
39
[]
0
[]
0
false
100
3
1
100
0
def getLowerRight_x(self) -> FloatObject: # deprecated deprecation_with_replacement("getLowerRight_x", "right", "3.0.0") return self.right
24,481
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.getLowerRight_y
(self)
return self.bottom
111
113
def getLowerRight_y(self) -> FloatObject: # deprecated deprecation_with_replacement("getLowerRight_y", "bottom", "3.0.0") return self.bottom
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L111-L113
39
[]
0
[]
0
false
100
3
1
100
0
def getLowerRight_y(self) -> FloatObject: # deprecated deprecation_with_replacement("getLowerRight_y", "bottom", "3.0.0") return self.bottom
24,482
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.lower_left
(self)
return self.left, self.bottom
Property to read and modify the lower left coordinate of this box in (x,y) form.
Property to read and modify the lower left coordinate of this box in (x,y) form.
116
121
def lower_left(self) -> Tuple[decimal.Decimal, decimal.Decimal]: """ Property to read and modify the lower left coordinate of this box in (x,y) form. """ return self.left, self.bottom
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L116-L121
39
[ 0, 1, 2, 3, 4, 5 ]
100
[]
0
true
100
6
1
100
2
def lower_left(self) -> Tuple[decimal.Decimal, decimal.Decimal]: return self.left, self.bottom
24,483
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.lower_left
(self, value: List[Any])
124
125
def lower_left(self, value: List[Any]) -> None: self[0], self[1] = (self._ensure_is_number(x) for x in value)
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L124-L125
39
[ 0, 1 ]
100
[]
0
true
100
2
1
100
0
def lower_left(self, value: List[Any]) -> None: self[0], self[1] = (self._ensure_is_number(x) for x in value)
24,484
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.lower_right
(self)
return self.right, self.bottom
Property to read and modify the lower right coordinate of this box in (x,y) form.
Property to read and modify the lower right coordinate of this box in (x,y) form.
128
133
def lower_right(self) -> Tuple[decimal.Decimal, decimal.Decimal]: """ Property to read and modify the lower right coordinate of this box in (x,y) form. """ return self.right, self.bottom
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L128-L133
39
[ 0, 1, 2, 3, 4, 5 ]
100
[]
0
true
100
6
1
100
2
def lower_right(self) -> Tuple[decimal.Decimal, decimal.Decimal]: return self.right, self.bottom
24,485
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.lower_right
(self, value: List[Any])
136
137
def lower_right(self, value: List[Any]) -> None: self[2], self[1] = (self._ensure_is_number(x) for x in value)
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L136-L137
39
[ 0, 1 ]
100
[]
0
true
100
2
1
100
0
def lower_right(self, value: List[Any]) -> None: self[2], self[1] = (self._ensure_is_number(x) for x in value)
24,486
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.upper_left
(self)
return self.left, self.top
Property to read and modify the upper left coordinate of this box in (x,y) form.
Property to read and modify the upper left coordinate of this box in (x,y) form.
140
145
def upper_left(self) -> Tuple[decimal.Decimal, decimal.Decimal]: """ Property to read and modify the upper left coordinate of this box in (x,y) form. """ return self.left, self.top
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L140-L145
39
[ 0, 1, 2, 3, 4, 5 ]
100
[]
0
true
100
6
1
100
2
def upper_left(self) -> Tuple[decimal.Decimal, decimal.Decimal]: return self.left, self.top
24,487
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.upper_left
(self, value: List[Any])
148
149
def upper_left(self, value: List[Any]) -> None: self[0], self[3] = (self._ensure_is_number(x) for x in value)
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L148-L149
39
[ 0, 1 ]
100
[]
0
true
100
2
1
100
0
def upper_left(self, value: List[Any]) -> None: self[0], self[3] = (self._ensure_is_number(x) for x in value)
24,488
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.upper_right
(self)
return self.right, self.top
Property to read and modify the upper right coordinate of this box in (x,y) form.
Property to read and modify the upper right coordinate of this box in (x,y) form.
152
157
def upper_right(self) -> Tuple[decimal.Decimal, decimal.Decimal]: """ Property to read and modify the upper right coordinate of this box in (x,y) form. """ return self.right, self.top
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L152-L157
39
[ 0, 1, 2, 3, 4, 5 ]
100
[]
0
true
100
6
1
100
2
def upper_right(self) -> Tuple[decimal.Decimal, decimal.Decimal]: return self.right, self.top
24,489
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.upper_right
(self, value: List[Any])
160
161
def upper_right(self, value: List[Any]) -> None: self[2], self[3] = (self._ensure_is_number(x) for x in value)
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L160-L161
39
[ 0, 1 ]
100
[]
0
true
100
2
1
100
0
def upper_right(self, value: List[Any]) -> None: self[2], self[3] = (self._ensure_is_number(x) for x in value)
24,490
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.getLowerLeft
( self, )
return self.lower_left
163
167
def getLowerLeft( self, ) -> Tuple[decimal.Decimal, decimal.Decimal]: # deprecated deprecation_with_replacement("getLowerLeft", "lower_left", "3.0.0") return self.lower_left
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L163-L167
39
[]
0
[]
0
false
100
5
1
100
0
def getLowerLeft( self, ) -> Tuple[decimal.Decimal, decimal.Decimal]: # deprecated deprecation_with_replacement("getLowerLeft", "lower_left", "3.0.0") return self.lower_left
24,491
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.getLowerRight
( self, )
return self.lower_right
169
173
def getLowerRight( self, ) -> Tuple[decimal.Decimal, decimal.Decimal]: # deprecated deprecation_with_replacement("getLowerRight", "lower_right", "3.0.0") return self.lower_right
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L169-L173
39
[]
0
[]
0
false
100
5
1
100
0
def getLowerRight( self, ) -> Tuple[decimal.Decimal, decimal.Decimal]: # deprecated deprecation_with_replacement("getLowerRight", "lower_right", "3.0.0") return self.lower_right
24,492
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.getUpperLeft
( self, )
return self.upper_left
175
179
def getUpperLeft( self, ) -> Tuple[decimal.Decimal, decimal.Decimal]: # deprecated deprecation_with_replacement("getUpperLeft", "upper_left", "3.0.0") return self.upper_left
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L175-L179
39
[]
0
[]
0
false
100
5
1
100
0
def getUpperLeft( self, ) -> Tuple[decimal.Decimal, decimal.Decimal]: # deprecated deprecation_with_replacement("getUpperLeft", "upper_left", "3.0.0") return self.upper_left
24,493
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.getUpperRight
( self, )
return self.upper_right
181
185
def getUpperRight( self, ) -> Tuple[decimal.Decimal, decimal.Decimal]: # deprecated deprecation_with_replacement("getUpperRight", "upper_right", "3.0.0") return self.upper_right
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L181-L185
39
[]
0
[]
0
false
100
5
1
100
0
def getUpperRight( self, ) -> Tuple[decimal.Decimal, decimal.Decimal]: # deprecated deprecation_with_replacement("getUpperRight", "upper_right", "3.0.0") return self.upper_right
24,494
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.setLowerLeft
(self, value: Tuple[float, float])
187
189
def setLowerLeft(self, value: Tuple[float, float]) -> None: # deprecated deprecation_with_replacement("setLowerLeft", "lower_left", "3.0.0") self.lower_left = value
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L187-L189
39
[]
0
[]
0
false
100
3
1
100
0
def setLowerLeft(self, value: Tuple[float, float]) -> None: # deprecated deprecation_with_replacement("setLowerLeft", "lower_left", "3.0.0") self.lower_left = value
24,495
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.setLowerRight
(self, value: Tuple[float, float])
191
193
def setLowerRight(self, value: Tuple[float, float]) -> None: # deprecated deprecation_with_replacement("setLowerRight", "lower_right", "3.0.0") self[2], self[1] = (self._ensure_is_number(x) for x in value)
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L191-L193
39
[]
0
[]
0
false
100
3
1
100
0
def setLowerRight(self, value: Tuple[float, float]) -> None: # deprecated deprecation_with_replacement("setLowerRight", "lower_right", "3.0.0") self[2], self[1] = (self._ensure_is_number(x) for x in value)
24,496
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.setUpperLeft
(self, value: Tuple[float, float])
195
197
def setUpperLeft(self, value: Tuple[float, float]) -> None: # deprecated deprecation_with_replacement("setUpperLeft", "upper_left", "3.0.0") self[0], self[3] = (self._ensure_is_number(x) for x in value)
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L195-L197
39
[]
0
[]
0
false
100
3
1
100
0
def setUpperLeft(self, value: Tuple[float, float]) -> None: # deprecated deprecation_with_replacement("setUpperLeft", "upper_left", "3.0.0") self[0], self[3] = (self._ensure_is_number(x) for x in value)
24,497
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.setUpperRight
(self, value: Tuple[float, float])
199
201
def setUpperRight(self, value: Tuple[float, float]) -> None: # deprecated deprecation_with_replacement("setUpperRight", "upper_right", "3.0.0") self[2], self[3] = (self._ensure_is_number(x) for x in value)
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L199-L201
39
[]
0
[]
0
false
100
3
1
100
0
def setUpperRight(self, value: Tuple[float, float]) -> None: # deprecated deprecation_with_replacement("setUpperRight", "upper_right", "3.0.0") self[2], self[3] = (self._ensure_is_number(x) for x in value)
24,498
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.width
(self)
return self.right - self.left
204
205
def width(self) -> decimal.Decimal: return self.right - self.left
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L204-L205
39
[ 0, 1 ]
100
[]
0
true
100
2
1
100
0
def width(self) -> decimal.Decimal: return self.right - self.left
24,499
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.getWidth
(self)
return self.width
207
209
def getWidth(self) -> decimal.Decimal: # deprecated deprecation_with_replacement("getWidth", "width", "3.0.0") return self.width
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L207-L209
39
[]
0
[]
0
false
100
3
1
100
0
def getWidth(self) -> decimal.Decimal: # deprecated deprecation_with_replacement("getWidth", "width", "3.0.0") return self.width
24,500
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.height
(self)
return self.top - self.bottom
212
213
def height(self) -> decimal.Decimal: return self.top - self.bottom
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L212-L213
39
[ 0, 1 ]
100
[]
0
true
100
2
1
100
0
def height(self) -> decimal.Decimal: return self.top - self.bottom
24,501
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.getHeight
(self)
return self.height
215
217
def getHeight(self) -> decimal.Decimal: # deprecated deprecation_with_replacement("getHeight", "height", "3.0.0") return self.height
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L215-L217
39
[]
0
[]
0
false
100
3
1
100
0
def getHeight(self) -> decimal.Decimal: # deprecated deprecation_with_replacement("getHeight", "height", "3.0.0") return self.height
24,502
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.lowerLeft
(self)
return self.lower_left
220
222
def lowerLeft(self) -> Tuple[decimal.Decimal, decimal.Decimal]: # deprecated deprecation_with_replacement("lowerLeft", "lower_left", "3.0.0") return self.lower_left
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L220-L222
39
[]
0
[]
0
false
100
3
1
100
0
def lowerLeft(self) -> Tuple[decimal.Decimal, decimal.Decimal]: # deprecated deprecation_with_replacement("lowerLeft", "lower_left", "3.0.0") return self.lower_left
24,503
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.lowerLeft
( self, value: Tuple[decimal.Decimal, decimal.Decimal] )
225
229
def lowerLeft( self, value: Tuple[decimal.Decimal, decimal.Decimal] ) -> None: # deprecated deprecation_with_replacement("lowerLeft", "lower_left", "3.0.0") self.lower_left = value
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L225-L229
39
[]
0
[]
0
false
100
5
1
100
0
def lowerLeft( self, value: Tuple[decimal.Decimal, decimal.Decimal] ) -> None: # deprecated deprecation_with_replacement("lowerLeft", "lower_left", "3.0.0") self.lower_left = value
24,504
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.lowerRight
(self)
return self.lower_right
232
234
def lowerRight(self) -> Tuple[decimal.Decimal, decimal.Decimal]: # deprecated deprecation_with_replacement("lowerRight", "lower_right", "3.0.0") return self.lower_right
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L232-L234
39
[]
0
[]
0
false
100
3
1
100
0
def lowerRight(self) -> Tuple[decimal.Decimal, decimal.Decimal]: # deprecated deprecation_with_replacement("lowerRight", "lower_right", "3.0.0") return self.lower_right
24,505
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.lowerRight
( self, value: Tuple[decimal.Decimal, decimal.Decimal] )
237
241
def lowerRight( self, value: Tuple[decimal.Decimal, decimal.Decimal] ) -> None: # deprecated deprecation_with_replacement("lowerRight", "lower_right", "3.0.0") self.lower_right = value
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L237-L241
39
[]
0
[]
0
false
100
5
1
100
0
def lowerRight( self, value: Tuple[decimal.Decimal, decimal.Decimal] ) -> None: # deprecated deprecation_with_replacement("lowerRight", "lower_right", "3.0.0") self.lower_right = value
24,506
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.upperLeft
(self)
return self.upper_left
244
246
def upperLeft(self) -> Tuple[decimal.Decimal, decimal.Decimal]: # deprecated deprecation_with_replacement("upperLeft", "upper_left", "3.0.0") return self.upper_left
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L244-L246
39
[]
0
[]
0
false
100
3
1
100
0
def upperLeft(self) -> Tuple[decimal.Decimal, decimal.Decimal]: # deprecated deprecation_with_replacement("upperLeft", "upper_left", "3.0.0") return self.upper_left
24,507
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.upperLeft
( self, value: Tuple[decimal.Decimal, decimal.Decimal] )
249
253
def upperLeft( self, value: Tuple[decimal.Decimal, decimal.Decimal] ) -> None: # deprecated deprecation_with_replacement("upperLeft", "upper_left", "3.0.0") self.upper_left = value
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L249-L253
39
[]
0
[]
0
false
100
5
1
100
0
def upperLeft( self, value: Tuple[decimal.Decimal, decimal.Decimal] ) -> None: # deprecated deprecation_with_replacement("upperLeft", "upper_left", "3.0.0") self.upper_left = value
24,508
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.upperRight
(self)
return self.upper_right
256
258
def upperRight(self) -> Tuple[decimal.Decimal, decimal.Decimal]: # deprecated deprecation_with_replacement("upperRight", "upper_right", "3.0.0") return self.upper_right
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L256-L258
39
[]
0
[]
0
false
100
3
1
100
0
def upperRight(self) -> Tuple[decimal.Decimal, decimal.Decimal]: # deprecated deprecation_with_replacement("upperRight", "upper_right", "3.0.0") return self.upper_right
24,509
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_rectangle.py
RectangleObject.upperRight
( self, value: Tuple[decimal.Decimal, decimal.Decimal] )
261
265
def upperRight( self, value: Tuple[decimal.Decimal, decimal.Decimal] ) -> None: # deprecated deprecation_with_replacement("upperRight", "upper_right", "3.0.0") self.upper_right = value
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_rectangle.py#L261-L265
39
[]
0
[]
0
false
100
5
1
100
0
def upperRight( self, value: Tuple[decimal.Decimal, decimal.Decimal] ) -> None: # deprecated deprecation_with_replacement("upperRight", "upper_right", "3.0.0") self.upper_right = value
24,510
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_base.py
encode_pdfdocencoding
(unicode_string: str)
return retval
654
663
def encode_pdfdocencoding(unicode_string: str) -> bytes: retval = b"" for c in unicode_string: try: retval += b_(chr(_pdfdoc_encoding_rev[c])) except KeyError: raise UnicodeEncodeError( "pdfdocencoding", c, -1, -1, "does not exist in translation table" ) return retval
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_base.py#L654-L663
39
[ 0, 1, 2, 3, 4, 5, 6, 9 ]
80
[]
0
false
99.71831
10
3
100
0
def encode_pdfdocencoding(unicode_string: str) -> bytes: retval = b"" for c in unicode_string: try: retval += b_(chr(_pdfdoc_encoding_rev[c])) except KeyError: raise UnicodeEncodeError( "pdfdocencoding", c, -1, -1, "does not exist in translation table" ) return retval
24,511
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_base.py
PdfObject.hash_value_data
(self)
return ("%s" % self).encode()
59
60
def hash_value_data(self) -> bytes: return ("%s" % self).encode()
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_base.py#L59-L60
39
[ 0, 1 ]
100
[]
0
true
99.71831
2
1
100
0
def hash_value_data(self) -> bytes: return ("%s" % self).encode()
24,512
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_base.py
PdfObject.hash_value
(self)
return ( "%s:%s" % ( self.__class__.__name__, self.hash_func(self.hash_value_data()).hexdigest(), ) ).encode()
62
69
def hash_value(self) -> bytes: return ( "%s:%s" % ( self.__class__.__name__, self.hash_func(self.hash_value_data()).hexdigest(), ) ).encode()
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_base.py#L62-L69
39
[ 0, 1 ]
25
[]
0
false
99.71831
8
1
100
0
def hash_value(self) -> bytes: return ( "%s:%s" % ( self.__class__.__name__, self.hash_func(self.hash_value_data()).hexdigest(), ) ).encode()
24,513
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_base.py
PdfObject.clone
( self, pdf_dest: PdfWriterProtocol, force_duplicate: bool = False, ignore_fields: Union[Tuple[str, ...], List[str], None] = (), )
clone object into pdf_dest (PdfWriterProtocol which is an interface for PdfWriter) force_duplicate: in standard if the object has been already cloned and reference, the copy is returned; when force_duplicate == True, a new copy is always performed ignore_fields : list/tuple of Fields names (for dictionaries that will be ignored during cloning (apply also to childs duplication) in standard, clone function call _reference_clone (see _reference) Args: pdf_dest: force_duplicate: (Default value = False) ignore_fields: Returns: The cloned PdfObject
clone object into pdf_dest (PdfWriterProtocol which is an interface for PdfWriter) force_duplicate: in standard if the object has been already cloned and reference, the copy is returned; when force_duplicate == True, a new copy is always performed ignore_fields : list/tuple of Fields names (for dictionaries that will be ignored during cloning (apply also to childs duplication) in standard, clone function call _reference_clone (see _reference)
71
92
def clone( self, pdf_dest: PdfWriterProtocol, force_duplicate: bool = False, ignore_fields: Union[Tuple[str, ...], List[str], None] = (), ) -> "PdfObject": """ clone object into pdf_dest (PdfWriterProtocol which is an interface for PdfWriter) force_duplicate: in standard if the object has been already cloned and reference, the copy is returned; when force_duplicate == True, a new copy is always performed ignore_fields : list/tuple of Fields names (for dictionaries that will be ignored during cloning (apply also to childs duplication) in standard, clone function call _reference_clone (see _reference) Args: pdf_dest: force_duplicate: (Default value = False) ignore_fields: Returns: The cloned PdfObject """ raise Exception("clone PdfObject")
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_base.py#L71-L92
39
[ 0, 20, 21 ]
13.636364
[]
0
false
99.71831
22
1
100
13
def clone( self, pdf_dest: PdfWriterProtocol, force_duplicate: bool = False, ignore_fields: Union[Tuple[str, ...], List[str], None] = (), ) -> "PdfObject": raise Exception("clone PdfObject")
24,514
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_base.py
PdfObject._reference_clone
( self, clone: Any, pdf_dest: PdfWriterProtocol )
return clone
reference the object within the _objects of pdf_dest only if indirect_reference attribute exists (which means the objects was already identified in xref/xobjstm) if object has been already referenced do nothing Args: clone: pdf_dest: Returns: The clone
reference the object within the _objects of pdf_dest only if indirect_reference attribute exists (which means the objects was already identified in xref/xobjstm) if object has been already referenced do nothing
94
130
def _reference_clone( self, clone: Any, pdf_dest: PdfWriterProtocol ) -> PdfObjectProtocol: """ reference the object within the _objects of pdf_dest only if indirect_reference attribute exists (which means the objects was already identified in xref/xobjstm) if object has been already referenced do nothing Args: clone: pdf_dest: Returns: The clone """ try: if clone.indirect_reference.pdf == pdf_dest: return clone except Exception: pass if hasattr(self, "indirect_reference"): ind = self.indirect_reference i = len(pdf_dest._objects) + 1 if ind is not None: if id(ind.pdf) not in pdf_dest._id_translated: pdf_dest._id_translated[id(ind.pdf)] = {} if ind.idnum in pdf_dest._id_translated[id(ind.pdf)]: obj = pdf_dest.get_object( pdf_dest._id_translated[id(ind.pdf)][ind.idnum] ) assert obj is not None return obj pdf_dest._id_translated[id(ind.pdf)][ind.idnum] = i pdf_dest._objects.append(clone) clone.indirect_reference = IndirectObject(i, 0, pdf_dest) return clone
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_base.py#L94-L130
39
[ 0, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36 ]
62.162162
[]
0
false
99.71831
37
8
100
11
def _reference_clone( self, clone: Any, pdf_dest: PdfWriterProtocol ) -> PdfObjectProtocol: try: if clone.indirect_reference.pdf == pdf_dest: return clone except Exception: pass if hasattr(self, "indirect_reference"): ind = self.indirect_reference i = len(pdf_dest._objects) + 1 if ind is not None: if id(ind.pdf) not in pdf_dest._id_translated: pdf_dest._id_translated[id(ind.pdf)] = {} if ind.idnum in pdf_dest._id_translated[id(ind.pdf)]: obj = pdf_dest.get_object( pdf_dest._id_translated[id(ind.pdf)][ind.idnum] ) assert obj is not None return obj pdf_dest._id_translated[id(ind.pdf)][ind.idnum] = i pdf_dest._objects.append(clone) clone.indirect_reference = IndirectObject(i, 0, pdf_dest) return clone
24,515
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_base.py
PdfObject.get_object
(self)
return self
Resolve indirect references.
Resolve indirect references.
132
134
def get_object(self) -> Optional["PdfObject"]: """Resolve indirect references.""" return self
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_base.py#L132-L134
39
[ 0, 1, 2 ]
100
[]
0
true
99.71831
3
1
100
1
def get_object(self) -> Optional["PdfObject"]: return self
24,516
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_base.py
PdfObject.getObject
(self)
return self.get_object()
136
138
def getObject(self) -> Optional["PdfObject"]: # deprecated deprecation_with_replacement("getObject", "get_object", "3.0.0") return self.get_object()
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_base.py#L136-L138
39
[]
0
[]
0
false
99.71831
3
1
100
0
def getObject(self) -> Optional["PdfObject"]: # deprecated deprecation_with_replacement("getObject", "get_object", "3.0.0") return self.get_object()
24,517
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_base.py
NullObject.clone
( self, pdf_dest: PdfWriterProtocol, force_duplicate: bool = False, ignore_fields: Union[Tuple[str, ...], List[str], None] = (), )
return cast("NullObject", self._reference_clone(NullObject(), pdf_dest))
clone object into pdf_dest
clone object into pdf_dest
147
154
def clone( self, pdf_dest: PdfWriterProtocol, force_duplicate: bool = False, ignore_fields: Union[Tuple[str, ...], List[str], None] = (), ) -> "NullObject": """clone object into pdf_dest""" return cast("NullObject", self._reference_clone(NullObject(), pdf_dest))
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_base.py#L147-L154
39
[ 0, 6, 7 ]
37.5
[]
0
false
99.71831
8
1
100
1
def clone( self, pdf_dest: PdfWriterProtocol, force_duplicate: bool = False, ignore_fields: Union[Tuple[str, ...], List[str], None] = (), ) -> "NullObject": return cast("NullObject", self._reference_clone(NullObject(), pdf_dest))
24,518
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_base.py
NullObject.write_to_stream
( self, stream: StreamType, encryption_key: Union[None, str, bytes] )
156
159
def write_to_stream( self, stream: StreamType, encryption_key: Union[None, str, bytes] ) -> None: stream.write(b"null")
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_base.py#L156-L159
39
[ 0, 3 ]
50
[]
0
false
99.71831
4
1
100
0
def write_to_stream( self, stream: StreamType, encryption_key: Union[None, str, bytes] ) -> None: stream.write(b"null")
24,519
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_base.py
NullObject.read_from_stream
(stream: StreamType)
return NullObject()
162
166
def read_from_stream(stream: StreamType) -> "NullObject": nulltxt = stream.read(4) if nulltxt != b"null": raise PdfReadError("Could not read Null object") return NullObject()
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_base.py#L162-L166
39
[ 0, 1, 2, 3, 4 ]
100
[]
0
true
99.71831
5
2
100
0
def read_from_stream(stream: StreamType) -> "NullObject": nulltxt = stream.read(4) if nulltxt != b"null": raise PdfReadError("Could not read Null object") return NullObject()
24,520
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_base.py
NullObject.writeToStream
( self, stream: StreamType, encryption_key: Union[None, str, bytes] )
168
172
def writeToStream( self, stream: StreamType, encryption_key: Union[None, str, bytes] ) -> None: # deprecated deprecation_with_replacement("writeToStream", "write_to_stream", "3.0.0") self.write_to_stream(stream, encryption_key)
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_base.py#L168-L172
39
[]
0
[]
0
false
99.71831
5
1
100
0
def writeToStream( self, stream: StreamType, encryption_key: Union[None, str, bytes] ) -> None: # deprecated deprecation_with_replacement("writeToStream", "write_to_stream", "3.0.0") self.write_to_stream(stream, encryption_key)
24,521
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_base.py
NullObject.__repr__
(self)
return "NullObject"
174
175
def __repr__(self) -> str: return "NullObject"
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_base.py#L174-L175
39
[]
0
[]
0
false
99.71831
2
1
100
0
def __repr__(self) -> str: return "NullObject"
24,522
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_base.py
NullObject.readFromStream
(stream: StreamType)
return NullObject.read_from_stream(stream)
178
180
def readFromStream(stream: StreamType) -> "NullObject": # deprecated deprecation_with_replacement("readFromStream", "read_from_stream", "3.0.0") return NullObject.read_from_stream(stream)
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_base.py#L178-L180
39
[]
0
[]
0
false
99.71831
3
1
100
0
def readFromStream(stream: StreamType) -> "NullObject": # deprecated deprecation_with_replacement("readFromStream", "read_from_stream", "3.0.0") return NullObject.read_from_stream(stream)
24,523
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_base.py
BooleanObject.__init__
(self, value: Any)
184
185
def __init__(self, value: Any) -> None: self.value = value
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_base.py#L184-L185
39
[ 0, 1 ]
100
[]
0
true
99.71831
2
1
100
0
def __init__(self, value: Any) -> None: self.value = value
24,524
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_base.py
BooleanObject.clone
( self, pdf_dest: PdfWriterProtocol, force_duplicate: bool = False, ignore_fields: Union[Tuple[str, ...], List[str], None] = (), )
return cast( "BooleanObject", self._reference_clone(BooleanObject(self.value), pdf_dest) )
clone object into pdf_dest
clone object into pdf_dest
187
196
def clone( self, pdf_dest: PdfWriterProtocol, force_duplicate: bool = False, ignore_fields: Union[Tuple[str, ...], List[str], None] = (), ) -> "BooleanObject": """clone object into pdf_dest""" return cast( "BooleanObject", self._reference_clone(BooleanObject(self.value), pdf_dest) )
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_base.py#L187-L196
39
[ 0, 6, 7, 8, 9 ]
50
[]
0
false
99.71831
10
1
100
1
def clone( self, pdf_dest: PdfWriterProtocol, force_duplicate: bool = False, ignore_fields: Union[Tuple[str, ...], List[str], None] = (), ) -> "BooleanObject": return cast( "BooleanObject", self._reference_clone(BooleanObject(self.value), pdf_dest) )
24,525
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_base.py
BooleanObject.__eq__
(self, __o: object)
198
204
def __eq__(self, __o: object) -> bool: if isinstance(__o, BooleanObject): return self.value == __o.value elif isinstance(__o, bool): return self.value == __o else: return False
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_base.py#L198-L204
39
[ 0, 1, 2, 3, 4, 6 ]
85.714286
[]
0
false
99.71831
7
3
100
0
def __eq__(self, __o: object) -> bool: if isinstance(__o, BooleanObject): return self.value == __o.value elif isinstance(__o, bool): return self.value == __o else: return False
24,526
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_base.py
BooleanObject.__repr__
(self)
return "True" if self.value else "False"
206
207
def __repr__(self) -> str: return "True" if self.value else "False"
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_base.py#L206-L207
39
[]
0
[]
0
false
99.71831
2
1
100
0
def __repr__(self) -> str: return "True" if self.value else "False"
24,527
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_base.py
BooleanObject.write_to_stream
( self, stream: StreamType, encryption_key: Union[None, str, bytes] )
209
215
def write_to_stream( self, stream: StreamType, encryption_key: Union[None, str, bytes] ) -> None: if self.value: stream.write(b"true") else: stream.write(b"false")
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_base.py#L209-L215
39
[ 0, 3, 4, 6 ]
57.142857
[]
0
false
99.71831
7
2
100
0
def write_to_stream( self, stream: StreamType, encryption_key: Union[None, str, bytes] ) -> None: if self.value: stream.write(b"true") else: stream.write(b"false")
24,528
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_base.py
BooleanObject.writeToStream
( self, stream: StreamType, encryption_key: Union[None, str, bytes] )
217
221
def writeToStream( self, stream: StreamType, encryption_key: Union[None, str, bytes] ) -> None: # deprecated deprecation_with_replacement("writeToStream", "write_to_stream", "3.0.0") self.write_to_stream(stream, encryption_key)
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_base.py#L217-L221
39
[]
0
[]
0
false
99.71831
5
1
100
0
def writeToStream( self, stream: StreamType, encryption_key: Union[None, str, bytes] ) -> None: # deprecated deprecation_with_replacement("writeToStream", "write_to_stream", "3.0.0") self.write_to_stream(stream, encryption_key)
24,529
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_base.py
BooleanObject.read_from_stream
(stream: StreamType)
224
232
def read_from_stream(stream: StreamType) -> "BooleanObject": word = stream.read(4) if word == b"true": return BooleanObject(True) elif word == b"fals": stream.read(1) return BooleanObject(False) else: raise PdfReadError("Could not read Boolean object")
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_base.py#L224-L232
39
[ 0, 1, 2, 3, 4, 5, 6, 8 ]
88.888889
[]
0
false
99.71831
9
3
100
0
def read_from_stream(stream: StreamType) -> "BooleanObject": word = stream.read(4) if word == b"true": return BooleanObject(True) elif word == b"fals": stream.read(1) return BooleanObject(False) else: raise PdfReadError("Could not read Boolean object")
24,530
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_base.py
BooleanObject.readFromStream
(stream: StreamType)
return BooleanObject.read_from_stream(stream)
235
237
def readFromStream(stream: StreamType) -> "BooleanObject": # deprecated deprecation_with_replacement("readFromStream", "read_from_stream", "3.0.0") return BooleanObject.read_from_stream(stream)
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_base.py#L235-L237
39
[]
0
[]
0
false
99.71831
3
1
100
0
def readFromStream(stream: StreamType) -> "BooleanObject": # deprecated deprecation_with_replacement("readFromStream", "read_from_stream", "3.0.0") return BooleanObject.read_from_stream(stream)
24,531
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_base.py
IndirectObject.__init__
(self, idnum: int, generation: int, pdf: Any)
241
244
def __init__(self, idnum: int, generation: int, pdf: Any) -> None: # PdfReader self.idnum = idnum self.generation = generation self.pdf = pdf
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_base.py#L241-L244
39
[ 0, 1, 2, 3 ]
100
[]
0
true
99.71831
4
1
100
0
def __init__(self, idnum: int, generation: int, pdf: Any) -> None: # PdfReader self.idnum = idnum self.generation = generation self.pdf = pdf
24,532
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_base.py
IndirectObject.clone
( self, pdf_dest: PdfWriterProtocol, force_duplicate: bool = False, ignore_fields: Union[Tuple[str, ...], List[str], None] = (), )
return dup.indirect_reference
clone object into pdf_dest
clone object into pdf_dest
246
267
def clone( self, pdf_dest: PdfWriterProtocol, force_duplicate: bool = False, ignore_fields: Union[Tuple[str, ...], List[str], None] = (), ) -> "IndirectObject": """clone object into pdf_dest""" if self.pdf == pdf_dest and not force_duplicate: # Already duplicated and no extra duplication required return self if id(self.pdf) not in pdf_dest._id_translated: pdf_dest._id_translated[id(self.pdf)] = {} if not force_duplicate and self.idnum in pdf_dest._id_translated[id(self.pdf)]: dup = pdf_dest.get_object(pdf_dest._id_translated[id(self.pdf)][self.idnum]) else: obj = self.get_object() assert obj is not None dup = obj.clone(pdf_dest, force_duplicate, ignore_fields) assert dup is not None assert dup.indirect_reference is not None return dup.indirect_reference
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_base.py#L246-L267
39
[ 0, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21 ]
77.272727
[]
0
false
99.71831
22
9
100
1
def clone( self, pdf_dest: PdfWriterProtocol, force_duplicate: bool = False, ignore_fields: Union[Tuple[str, ...], List[str], None] = (), ) -> "IndirectObject": if self.pdf == pdf_dest and not force_duplicate: # Already duplicated and no extra duplication required return self if id(self.pdf) not in pdf_dest._id_translated: pdf_dest._id_translated[id(self.pdf)] = {} if not force_duplicate and self.idnum in pdf_dest._id_translated[id(self.pdf)]: dup = pdf_dest.get_object(pdf_dest._id_translated[id(self.pdf)][self.idnum]) else: obj = self.get_object() assert obj is not None dup = obj.clone(pdf_dest, force_duplicate, ignore_fields) assert dup is not None assert dup.indirect_reference is not None return dup.indirect_reference
24,533
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_base.py
IndirectObject.indirect_reference
(self)
return self
270
271
def indirect_reference(self) -> "IndirectObject": # type: ignore[override] return self
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_base.py#L270-L271
39
[ 0, 1 ]
100
[]
0
true
99.71831
2
1
100
0
def indirect_reference(self) -> "IndirectObject": # type: ignore[override] return self
24,534
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_base.py
IndirectObject.get_object
(self)
return obj.get_object()
273
277
def get_object(self) -> Optional["PdfObject"]: obj = self.pdf.get_object(self) if obj is None: return None return obj.get_object()
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_base.py#L273-L277
39
[ 0, 1, 2, 3, 4 ]
100
[]
0
true
99.71831
5
2
100
0
def get_object(self) -> Optional["PdfObject"]: obj = self.pdf.get_object(self) if obj is None: return None return obj.get_object()
24,535
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_base.py
IndirectObject.__repr__
(self)
return f"IndirectObject({self.idnum!r}, {self.generation!r}, {id(self.pdf)})"
279
280
def __repr__(self) -> str: return f"IndirectObject({self.idnum!r}, {self.generation!r}, {id(self.pdf)})"
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_base.py#L279-L280
39
[]
0
[]
0
false
99.71831
2
1
100
0
def __repr__(self) -> str: return f"IndirectObject({self.idnum!r}, {self.generation!r}, {id(self.pdf)})"
24,536
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_base.py
IndirectObject.__eq__
(self, other: Any)
return ( other is not None and isinstance(other, IndirectObject) and self.idnum == other.idnum and self.generation == other.generation and self.pdf is other.pdf )
282
289
def __eq__(self, other: Any) -> bool: return ( other is not None and isinstance(other, IndirectObject) and self.idnum == other.idnum and self.generation == other.generation and self.pdf is other.pdf )
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_base.py#L282-L289
39
[ 0, 1 ]
25
[]
0
false
99.71831
8
5
100
0
def __eq__(self, other: Any) -> bool: return ( other is not None and isinstance(other, IndirectObject) and self.idnum == other.idnum and self.generation == other.generation and self.pdf is other.pdf )
24,537
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_base.py
IndirectObject.__ne__
(self, other: Any)
return not self.__eq__(other)
291
292
def __ne__(self, other: Any) -> bool: return not self.__eq__(other)
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_base.py#L291-L292
39
[ 0, 1 ]
100
[]
0
true
99.71831
2
1
100
0
def __ne__(self, other: Any) -> bool: return not self.__eq__(other)
24,538
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_base.py
IndirectObject.write_to_stream
( self, stream: StreamType, encryption_key: Union[None, str, bytes] )
294
297
def write_to_stream( self, stream: StreamType, encryption_key: Union[None, str, bytes] ) -> None: stream.write(b_(f"{self.idnum} {self.generation} R"))
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_base.py#L294-L297
39
[ 0, 3 ]
50
[]
0
false
99.71831
4
1
100
0
def write_to_stream( self, stream: StreamType, encryption_key: Union[None, str, bytes] ) -> None: stream.write(b_(f"{self.idnum} {self.generation} R"))
24,539
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_base.py
IndirectObject.writeToStream
( self, stream: StreamType, encryption_key: Union[None, str, bytes] )
299
303
def writeToStream( self, stream: StreamType, encryption_key: Union[None, str, bytes] ) -> None: # deprecated deprecation_with_replacement("writeToStream", "write_to_stream", "3.0.0") self.write_to_stream(stream, encryption_key)
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_base.py#L299-L303
39
[]
0
[]
0
false
99.71831
5
1
100
0
def writeToStream( self, stream: StreamType, encryption_key: Union[None, str, bytes] ) -> None: # deprecated deprecation_with_replacement("writeToStream", "write_to_stream", "3.0.0") self.write_to_stream(stream, encryption_key)
24,540
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_base.py
IndirectObject.read_from_stream
(stream: StreamType, pdf: Any)
return IndirectObject(int(idnum), int(generation), pdf)
306
330
def read_from_stream(stream: StreamType, pdf: Any) -> "IndirectObject": # PdfReader idnum = b"" while True: tok = stream.read(1) if not tok: raise PdfStreamError(STREAM_TRUNCATED_PREMATURELY) if tok.isspace(): break idnum += tok generation = b"" while True: tok = stream.read(1) if not tok: raise PdfStreamError(STREAM_TRUNCATED_PREMATURELY) if tok.isspace(): if not generation: continue break generation += tok r = read_non_whitespace(stream) if r != b"R": raise PdfReadError( f"Error reading indirect object reference at byte {hex_str(stream.tell())}" ) return IndirectObject(int(idnum), int(generation), pdf)
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_base.py#L306-L330
39
[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 24 ]
92
[]
0
false
99.71831
25
9
100
0
def read_from_stream(stream: StreamType, pdf: Any) -> "IndirectObject": # PdfReader idnum = b"" while True: tok = stream.read(1) if not tok: raise PdfStreamError(STREAM_TRUNCATED_PREMATURELY) if tok.isspace(): break idnum += tok generation = b"" while True: tok = stream.read(1) if not tok: raise PdfStreamError(STREAM_TRUNCATED_PREMATURELY) if tok.isspace(): if not generation: continue break generation += tok r = read_non_whitespace(stream) if r != b"R": raise PdfReadError( f"Error reading indirect object reference at byte {hex_str(stream.tell())}" ) return IndirectObject(int(idnum), int(generation), pdf)
24,541
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_base.py
IndirectObject.readFromStream
( stream: StreamType, pdf: Any # PdfReader )
return IndirectObject.read_from_stream(stream, pdf)
333
337
def readFromStream( stream: StreamType, pdf: Any # PdfReader ) -> "IndirectObject": # deprecated deprecation_with_replacement("readFromStream", "read_from_stream", "3.0.0") return IndirectObject.read_from_stream(stream, pdf)
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_base.py#L333-L337
39
[]
0
[]
0
false
99.71831
5
1
100
0
def readFromStream( stream: StreamType, pdf: Any # PdfReader ) -> "IndirectObject": # deprecated deprecation_with_replacement("readFromStream", "read_from_stream", "3.0.0") return IndirectObject.read_from_stream(stream, pdf)
24,542
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_base.py
FloatObject.__new__
( cls, value: Union[str, Any] = "0", context: Optional[Any] = None )
341
350
def __new__( cls, value: Union[str, Any] = "0", context: Optional[Any] = None ) -> "FloatObject": try: return decimal.Decimal.__new__(cls, str_(value), context) except Exception: # If this isn't a valid decimal (happens in malformed PDFs) # fallback to 0 logger_warning(f"FloatObject ({value}) invalid; use 0.0 instead", __name__) return decimal.Decimal.__new__(cls, "0.0")
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_base.py#L341-L350
39
[ 0, 3, 4, 5, 6, 7, 8, 9 ]
80
[]
0
false
99.71831
10
2
100
0
def __new__( cls, value: Union[str, Any] = "0", context: Optional[Any] = None ) -> "FloatObject": try: return decimal.Decimal.__new__(cls, str_(value), context) except Exception: # If this isn't a valid decimal (happens in malformed PDFs) # fallback to 0 logger_warning(f"FloatObject ({value}) invalid; use 0.0 instead", __name__) return decimal.Decimal.__new__(cls, "0.0")
24,543
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_base.py
FloatObject.clone
( self, pdf_dest: Any, force_duplicate: bool = False, ignore_fields: Union[Tuple[str, ...], List[str], None] = (), )
return cast("FloatObject", self._reference_clone(FloatObject(self), pdf_dest))
clone object into pdf_dest
clone object into pdf_dest
352
359
def clone( self, pdf_dest: Any, force_duplicate: bool = False, ignore_fields: Union[Tuple[str, ...], List[str], None] = (), ) -> "FloatObject": """clone object into pdf_dest""" return cast("FloatObject", self._reference_clone(FloatObject(self), pdf_dest))
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_base.py#L352-L359
39
[ 0, 6, 7 ]
37.5
[]
0
false
99.71831
8
1
100
1
def clone( self, pdf_dest: Any, force_duplicate: bool = False, ignore_fields: Union[Tuple[str, ...], List[str], None] = (), ) -> "FloatObject": return cast("FloatObject", self._reference_clone(FloatObject(self), pdf_dest))
24,544
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_base.py
FloatObject.__repr__
(self)
361
368
def __repr__(self) -> str: if self == self.to_integral(): # If this is an integer, format it with no decimal place. return str(self.quantize(decimal.Decimal(1))) else: # Otherwise, format it with a decimal place, taking care to # remove any extraneous trailing zeros. return f"{self:f}".rstrip("0")
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_base.py#L361-L368
39
[]
0
[]
0
false
99.71831
8
2
100
0
def __repr__(self) -> str: if self == self.to_integral(): # If this is an integer, format it with no decimal place. return str(self.quantize(decimal.Decimal(1))) else: # Otherwise, format it with a decimal place, taking care to # remove any extraneous trailing zeros. return f"{self:f}".rstrip("0")
24,545
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_base.py
FloatObject.as_numeric
(self)
return float(repr(self).encode("utf8"))
370
371
def as_numeric(self) -> float: return float(repr(self).encode("utf8"))
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_base.py#L370-L371
39
[ 0, 1 ]
100
[]
0
true
99.71831
2
1
100
0
def as_numeric(self) -> float: return float(repr(self).encode("utf8"))
24,546
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_base.py
FloatObject.write_to_stream
( self, stream: StreamType, encryption_key: Union[None, str, bytes] )
373
376
def write_to_stream( self, stream: StreamType, encryption_key: Union[None, str, bytes] ) -> None: stream.write(repr(self).encode("utf8"))
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_base.py#L373-L376
39
[ 0, 3 ]
50
[]
0
false
99.71831
4
1
100
0
def write_to_stream( self, stream: StreamType, encryption_key: Union[None, str, bytes] ) -> None: stream.write(repr(self).encode("utf8"))
24,547
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_base.py
FloatObject.writeToStream
( self, stream: StreamType, encryption_key: Union[None, str, bytes] )
378
382
def writeToStream( self, stream: StreamType, encryption_key: Union[None, str, bytes] ) -> None: # deprecated deprecation_with_replacement("writeToStream", "write_to_stream", "3.0.0") self.write_to_stream(stream, encryption_key)
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_base.py#L378-L382
39
[]
0
[]
0
false
99.71831
5
1
100
0
def writeToStream( self, stream: StreamType, encryption_key: Union[None, str, bytes] ) -> None: # deprecated deprecation_with_replacement("writeToStream", "write_to_stream", "3.0.0") self.write_to_stream(stream, encryption_key)
24,548
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_base.py
NumberObject.__new__
(cls, value: Any)
388
393
def __new__(cls, value: Any) -> "NumberObject": try: return int.__new__(cls, int(value)) except ValueError: logger_warning(f"NumberObject({value}) invalid; use 0 instead", __name__) return int.__new__(cls, 0)
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_base.py#L388-L393
39
[ 0, 1, 2, 3, 4, 5 ]
100
[]
0
true
99.71831
6
2
100
0
def __new__(cls, value: Any) -> "NumberObject": try: return int.__new__(cls, int(value)) except ValueError: logger_warning(f"NumberObject({value}) invalid; use 0 instead", __name__) return int.__new__(cls, 0)
24,549
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_base.py
NumberObject.clone
( self, pdf_dest: Any, force_duplicate: bool = False, ignore_fields: Union[Tuple[str, ...], List[str], None] = (), )
return cast("NumberObject", self._reference_clone(NumberObject(self), pdf_dest))
clone object into pdf_dest
clone object into pdf_dest
395
402
def clone( self, pdf_dest: Any, force_duplicate: bool = False, ignore_fields: Union[Tuple[str, ...], List[str], None] = (), ) -> "NumberObject": """clone object into pdf_dest""" return cast("NumberObject", self._reference_clone(NumberObject(self), pdf_dest))
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_base.py#L395-L402
39
[ 0, 6, 7 ]
37.5
[]
0
false
99.71831
8
1
100
1
def clone( self, pdf_dest: Any, force_duplicate: bool = False, ignore_fields: Union[Tuple[str, ...], List[str], None] = (), ) -> "NumberObject": return cast("NumberObject", self._reference_clone(NumberObject(self), pdf_dest))
24,550
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_base.py
NumberObject.as_numeric
(self)
return int(repr(self).encode("utf8"))
404
405
def as_numeric(self) -> int: return int(repr(self).encode("utf8"))
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_base.py#L404-L405
39
[ 0, 1 ]
100
[]
0
true
99.71831
2
1
100
0
def as_numeric(self) -> int: return int(repr(self).encode("utf8"))
24,551
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_base.py
NumberObject.write_to_stream
( self, stream: StreamType, encryption_key: Union[None, str, bytes] )
407
410
def write_to_stream( self, stream: StreamType, encryption_key: Union[None, str, bytes] ) -> None: stream.write(repr(self).encode("utf8"))
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_base.py#L407-L410
39
[ 0, 3 ]
50
[]
0
false
99.71831
4
1
100
0
def write_to_stream( self, stream: StreamType, encryption_key: Union[None, str, bytes] ) -> None: stream.write(repr(self).encode("utf8"))
24,552
py-pdf/pypdf
d942a49074de9fb89ea374cd7f36f6d74a4a3451
pypdf/generic/_base.py
NumberObject.writeToStream
( self, stream: StreamType, encryption_key: Union[None, str, bytes] )
412
416
def writeToStream( self, stream: StreamType, encryption_key: Union[None, str, bytes] ) -> None: # deprecated deprecation_with_replacement("writeToStream", "write_to_stream", "3.0.0") self.write_to_stream(stream, encryption_key)
https://github.com/py-pdf/pypdf/blob/d942a49074de9fb89ea374cd7f36f6d74a4a3451/project39/pypdf/generic/_base.py#L412-L416
39
[]
0
[]
0
false
99.71831
5
1
100
0
def writeToStream( self, stream: StreamType, encryption_key: Union[None, str, bytes] ) -> None: # deprecated deprecation_with_replacement("writeToStream", "write_to_stream", "3.0.0") self.write_to_stream(stream, encryption_key)
24,553