From 0a53d6c7ec40d16b3376840c00359cf52f47f7f6 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Wed, 28 Mar 2018 20:17:10 +0100 Subject: [PATCH] Remove types --- build.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.py b/build.py index df65316..09cba33 100755 --- a/build.py +++ b/build.py @@ -15,7 +15,7 @@ CONTEXT_FILE = CWD / 'context.yaml' WORDCOUNT_TEMPLATE = BASE_DIR / 'wordcount.yaml' -def build(input_file: pathlib.Path, additional_args=None): +def build(input_file, additional_args=None): build_args = ['pandoc', str(input_file)] if CONTEXT_FILE.exists(): @@ -33,14 +33,14 @@ def build(input_file: pathlib.Path, additional_args=None): return subprocess.run(build_args, cwd=str(BASE_DIR), check=True) -def get_word_count() -> int: +def get_word_count(): words = subprocess.check_output([ 'pdftotext', str(OUTPUT_FILE), '-' ], cwd=str(BASE_DIR)) return len(re.findall(r'\w+', words.decode())) -def write_wordcount() -> pathlib.Path: +def write_wordcount(): _, out_file_path = tempfile.mkstemp(suffix='.yaml') wordcount = get_word_count() with open(out_file_path, 'w') as out_file: