1
0
mirror of https://github.com/kanzure/pdfparanoia.git synced 2024-12-04 23:15:52 +01:00

use explicit imports

Mock tests will be much easier if explicit imports are used everywhere
instead of the previous format.
This commit is contained in:
Bryan Bishop 2013-07-09 01:47:18 -05:00
parent cafb7330b6
commit 1070605316

View File

@ -12,10 +12,7 @@ from StringIO import StringIO
# Maybe one day pdfquery will be able to save pdf. # Maybe one day pdfquery will be able to save pdf.
# from pdfquery import PDFQuery # from pdfquery import PDFQuery
from pdfminer.pdfparser import ( import pdfminer.pdfparser
PDFParser,
PDFDocument,
)
from .eraser import replace_object_with from .eraser import replace_object_with
@ -27,8 +24,8 @@ def parse_pdf(handler):
handler.seek(0) handler.seek(0)
# setup for parsing # setup for parsing
parser = PDFParser(handler) parser = pdfminer.pdfparser.PDFParser(handler)
doc = PDFDocument() doc = pdfminer.pdfparser.PDFDocument()
parser.set_document(doc) parser.set_document(doc)
doc.set_parser(parser) doc.set_parser(parser)