You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was reading the source code of PdfFileReader class PyPDF2/pdf.py
and have found some methods which look like they were meant to be defined within a class, since they take self as a parameter. I initially thought they were somehow accidentally unindented from the PdfFileReader class, but on further searching, I found that these methods aren't even documented on the documentation site.
Given below, are permalinks to the offending functions.
They are used for createRectangleAccessor of the Page object. We have four types of rectangles:
CropBox
BleedBox
TrimBox
ArtBox
Those methods should be private (have a leading _, hence _getRectangle, _setRectangle, ...). But the fact that the first argument is called self is fine.
I was reading the source code of PdfFileReader class PyPDF2/pdf.py
and have found some methods which look like they were meant to be defined within a class, since they take
self
as a parameter. I initially thought they were somehow accidentally unindented from the PdfFileReader class, but on further searching, I found that these methods aren't even documented on the documentation site.Given below, are permalinks to the offending functions.
https://github.com/mstamy2/PyPDF2/blob/18a2627adac13124d4122c8b92aaa863ccfb8c29/PyPDF2/pdf.py#L2119
https://github.com/mstamy2/PyPDF2/blob/18a2627adac13124d4122c8b92aaa863ccfb8c29/PyPDF2/pdf.py#L2135
https://github.com/mstamy2/PyPDF2/blob/18a2627adac13124d4122c8b92aaa863ccfb8c29/PyPDF2/pdf.py#L2141
https://github.com/mstamy2/PyPDF2/blob/18a2627adac13124d4122c8b92aaa863ccfb8c29/PyPDF2/pdf.py#L2145
Maybe these methods were to be removed, and weren't.
Anyways, I thought to make an issue since this doesn't seem an intentional feature.
The text was updated successfully, but these errors were encountered: