py3: Remove (most) __future__ imports

There were two used:

- print_function
- absolute_import

Both of these are mandatory in Python 3.0 onwards [1] and can therefore
be removed...mostly. Unfortunately, mypy is still running in Python 2.7
mode, meaning we need the 'print_function' future wherever we're calling
'print' with the 'file' argument. There's also a single
'absolute_import' future that must be retained as its removal breaks a
test for as-yet unknown reasons.  TODOs are added to resolve both issues
in the future.

[1] https://docs.python.org/3/library/__future__.html

Signed-off-by: Stephen Finucane <stephen@that.guru>
This commit is contained in:
Stephen Finucane
2018-10-05 18:02:56 +01:00
parent a3d3fecf84
commit d345d0f8c1
24 changed files with 1 additions and 30 deletions

View File

@@ -1,7 +1,5 @@
#!/usr/bin/env python
from __future__ import print_function
import argparse
import os
import re