Merge pull request #5509 from stephenfin/remove-future-imports

Remove future imports
This commit is contained in:
Takeshi KOMIYA authored and GitHub committed 2018-12-17 20:32:39 +09:00
commit 8ea3f7fad9
26 files changed
+5 -33

No files matched your search

-2
View File
@@ -11,8 +11,6 @@
# Keep this file executable as-is in Python 3!
# (Otherwise getting the version out of it from setup.py is impossible.)
from __future__ import absolute_import
import os
import warnings
from os import path
-1
View File
@@ -9,7 +9,6 @@
:copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from __future__ import absolute_import
import gzip
import re
-2
View File
@@ -8,8 +8,6 @@
:license: BSD, see LICENSE for details.
"""
from __future__ import unicode_literals
from codecs import open
from collections import defaultdict, OrderedDict
from datetime import datetime, tzinfo, timedelta
-1
View File
@@ -7,7 +7,6 @@
:copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from __future__ import absolute_import
import argparse
import locale
-1
View File
@@ -7,7 +7,6 @@
:copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from __future__ import absolute_import
import sys
import warnings
-1
View File
@@ -8,7 +8,6 @@
:copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from __future__ import absolute_import
import doctest
import re
-1
View File
@@ -7,7 +7,6 @@
:copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from __future__ import absolute_import
import fnmatch
import os
-2
View File
@@ -8,8 +8,6 @@
:license: BSD, see LICENSE for details.
"""
from __future__ import absolute_import
import sys
import warnings
-1
View File
@@ -8,7 +8,6 @@
:copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from __future__ import absolute_import
from typing import List, Tuple, cast
-1
View File
@@ -7,7 +7,6 @@
:copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from __future__ import absolute_import
import os
import re
-1
View File
@@ -7,7 +7,6 @@
:copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from __future__ import absolute_import
import os
import posixpath
-1
View File
@@ -7,7 +7,6 @@
:copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from __future__ import absolute_import
import base64
import imghdr
-1
View File
@@ -7,7 +7,6 @@
:copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from __future__ import absolute_import
import builtins
import enum
-1
View File
@@ -7,7 +7,6 @@
:copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from __future__ import absolute_import
import logging
import logging.handlers
-1
View File
@@ -7,7 +7,6 @@
:copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from __future__ import absolute_import
import re
from typing import Any, cast
-1
View File
@@ -7,7 +7,6 @@
:copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from __future__ import absolute_import
import os
import time
-2
View File
@@ -8,8 +8,6 @@
:license: BSD, see LICENSE for details.
"""
from __future__ import absolute_import
import warnings
from contextlib import contextmanager
from urllib.parse import urlsplit
-1
View File
@@ -7,7 +7,6 @@
:copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from __future__ import absolute_import
import re
from contextlib import contextmanager
-1
View File
@@ -24,7 +24,6 @@
See the LICENSE file and the original docutils code for details.
"""
from __future__ import absolute_import, unicode_literals
import re
-2
View File
@@ -8,8 +8,6 @@
:license: BSD, see LICENSE for details.
"""
from __future__ import unicode_literals
if False:
# For type annotation
from typing import Dict # NOQA
@@ -1,4 +1,5 @@
#!/usr/bin/env python
#!/usr/bin/env python3
import os
import mod_resource
@@ -1,4 +1,3 @@
from __future__ import absolute_import
import enum
@@ -1,3 +1,4 @@
# TODO(stephenfin): Removing this breaks tests. Why?
from __future__ import absolute_import
from .submodule import func1, Class1 # NOQA
@@ -1,4 +1,2 @@
from __future__ import absolute_import
from .mod1 import func1, Class1 # NOQA
from .mod2 import func2, Class2 # NOQA
+1 -3
View File
@@ -1,6 +1,4 @@
#!/usr/bin/env python
from __future__ import print_function
#!/usr/bin/env python3
import argparse
import os
+1 -1
View File
@@ -59,7 +59,7 @@ def sphinx_has_header(physical_line, filename, lines, line_number):
# line number correction
offset = 1
if lines[0:1] == ['#!/usr/bin/env python\n']:
if lines[0:1] == ['#!/usr/bin/env python3\n']:
lines = lines[1:]
offset = 2