diff --git a/.gitignore b/.gitignore index 6e63b9eb..f22a2a08 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ profile/profile.tar cabal.sandbox.config .tmp1 .tmp2 +.tmp3 diff --git a/verify_formatting.py b/verify_formatting.py index 20b480a5..6fb02281 100755 --- a/verify_formatting.py +++ b/verify_formatting.py @@ -8,8 +8,11 @@ import subprocess def hindent(contents): - output = subprocess.check_output(["hindent", "--style", "gibiansky"], - input=bytes(contents, 'utf-8')) + with open(".tmp3", "w") as f: + f.write(contents) + with open(".tmp3", "r") as f: + output = subprocess.check_output(["hindent", "--style", "gibiansky"], + stdin=f) return output.decode('utf-8')