From 268e9fb2bd8535d0c1293f666fd79f6bf8b16d9e Mon Sep 17 00:00:00 2001 From: Cathal Garvey Date: Sat, 30 May 2015 17:05:28 +0100 Subject: [PATCH] Removed typechecking, nothing's exploded yet and argparse does lots of heavy lifting already. --- tools/pdf2txt.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/tools/pdf2txt.py b/tools/pdf2txt.py index 7e4547e..f449928 100755 --- a/tools/pdf2txt.py +++ b/tools/pdf2txt.py @@ -9,21 +9,6 @@ import pdfminer.high_level import pdfminer.layout -def _check_arg(): - """ - Type-checking the ugly way, because we can't do arg annotations and reflection - in Python 2. - """ - arg = locals()[arg_name] - assert isinstance(arg, arg_permitted), ("Argument '{}' should be of type(s)" - " '{}' but is type '{}'").format(arg_name, arg_permitted, type(arg)) - if contains_permitted is not None and arg: - for contained in arg: - assert isinstance(contained, contains_permitted), ("Value within" - " argument '{}' should be of type '{}' but is '{}'" - ).format(arg_name, contains_permitted, type(contained)) - - def extract_text(files=[], outfile='-', _py2_no_more_posargs=None, # Bloody Python2 needs a shim no_laparams=False, all_texts=None, detect_vertical=None, # LAParams