Skip to content

Commit a8aa9b3

Browse files
Update get_text_lines docstring to match actual behavior
The function returns a list of bytes read from a BytesIO, not unicode text lines, and treats max_pages=0 as no limit. Signed-off-by: Ali Zulfiqar <codewithfourtix@gmail.com>
1 parent 2ca71b2 commit a8aa9b3

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/textcode/pdf.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@
2222

2323
def get_text_lines(location, max_pages=5):
2424
"""
25-
Return a list of unicode text lines extracted from a pdf file at
26-
`location`. May raise exceptions. Extract up to `max_pages` pages.
25+
Return a list of text lines, as bytes, extracted from a pdf file at
26+
`location`. May raise exceptions. Extract up to `max_pages` pages, or
27+
all pages if `max_pages` is 0.
2728
"""
2829
extracted_text = BytesIO()
2930
laparams = LAParams()

0 commit comments

Comments
 (0)