From 784ccfc040dc8efa1a64d3c7d4070b66beb15d08 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Fri, 1 Jan 2021 08:42:31 -0500 Subject: [PATCH] strip python2-only coding:utf-8 & print_function settings We're committed to Python 3 at this point, so clean up boilerplate. Bug: https://crbug.com/gerrit/10418 Change-Id: Ib1719ba2eb65c53b94881a1a1bf203ddfcaaafed Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/292382 Reviewed-by: Chris Mcdonald Tested-by: Mike Frysinger --- color.py | 2 -- command.py | 2 -- editor.py | 3 --- error.py | 2 -- event_log.py | 4 ---- git_command.py | 3 --- git_config.py | 4 ---- git_refs.py | 2 -- gitc_utils.py | 3 --- hooks.py | 2 -- main.py | 2 -- manifest_xml.py | 3 --- pager.py | 3 --- platform_utils.py | 2 -- platform_utils_win32.py | 2 -- progress.py | 2 -- project.py | 3 --- pyversion.py | 2 -- repo_trace.py | 3 --- run_tests | 3 --- setup.py | 3 --- subcmds/__init__.py | 2 -- subcmds/abandon.py | 4 ---- subcmds/branches.py | 3 --- subcmds/checkout.py | 3 --- subcmds/cherry_pick.py | 3 --- subcmds/diff.py | 2 -- subcmds/diffmanifests.py | 2 -- subcmds/download.py | 3 --- subcmds/forall.py | 3 --- subcmds/gitc_delete.py | 3 --- subcmds/gitc_init.py | 3 --- subcmds/grep.py | 4 ---- subcmds/help.py | 3 --- subcmds/info.py | 2 -- subcmds/init.py | 4 ---- subcmds/list.py | 4 ---- subcmds/manifest.py | 4 ---- subcmds/overview.py | 3 --- subcmds/prune.py | 3 --- subcmds/rebase.py | 3 --- subcmds/selfupdate.py | 3 --- subcmds/smartsync.py | 2 -- subcmds/stage.py | 3 --- subcmds/start.py | 3 --- subcmds/status.py | 4 ---- subcmds/sync.py | 4 ---- subcmds/upload.py | 3 --- subcmds/version.py | 4 ---- tests/test_editor.py | 4 ---- tests/test_git_command.py | 4 ---- tests/test_git_config.py | 4 ---- tests/test_hooks.py | 5 ----- tests/test_manifest_xml.py | 4 ---- tests/test_project.py | 4 ---- tests/test_wrapper.py | 4 ---- wrapper.py | 3 --- 57 files changed, 174 deletions(-) diff --git a/color.py b/color.py index 7df20223..fdd72534 100644 --- a/color.py +++ b/color.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2008 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/command.py b/command.py index b1fa0ef5..ef2554da 100644 --- a/command.py +++ b/command.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2008 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/editor.py b/editor.py index 4306836d..b84a42d4 100644 --- a/editor.py +++ b/editor.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2008 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import print_function import os import re import sys diff --git a/error.py b/error.py index cfed8083..225eb59d 100644 --- a/error.py +++ b/error.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2008 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/event_log.py b/event_log.py index 5dd9db66..c77c5648 100644 --- a/event_log.py +++ b/event_log.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2017 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,8 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import print_function - import json import multiprocessing diff --git a/git_command.py b/git_command.py index 1cb8f1aa..b29d240e 100644 --- a/git_command.py +++ b/git_command.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2008 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import print_function import os import re import sys diff --git a/git_config.py b/git_config.py index 9af90dfd..fd8e9268 100644 --- a/git_config.py +++ b/git_config.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2008 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,8 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import print_function - import contextlib import errno import json diff --git a/git_refs.py b/git_refs.py index e2b62ab2..3c8a9867 100644 --- a/git_refs.py +++ b/git_refs.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2009 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/gitc_utils.py b/gitc_utils.py index 6354702f..89cfbeca 100644 --- a/gitc_utils.py +++ b/gitc_utils.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2015 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import print_function import os import platform import re diff --git a/hooks.py b/hooks.py index 1abba0c4..f805de6b 100644 --- a/hooks.py +++ b/hooks.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2008 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/main.py b/main.py index ebfa6524..cd0b8620 100755 --- a/main.py +++ b/main.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding:utf-8 -*- # # Copyright (C) 2008 The Android Open Source Project # @@ -21,7 +20,6 @@ People shouldn't run this directly; instead, they should use the `repo` wrapper which takes care of execing this entry point. """ -from __future__ import print_function import getpass import netrc import optparse diff --git a/manifest_xml.py b/manifest_xml.py index 00659316..bbecb934 100644 --- a/manifest_xml.py +++ b/manifest_xml.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2008 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import print_function import itertools import os import re diff --git a/pager.py b/pager.py index 167f003f..352923d9 100644 --- a/pager.py +++ b/pager.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2008 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import print_function import os import select import subprocess diff --git a/platform_utils.py b/platform_utils.py index d10e888d..6dd3385d 100644 --- a/platform_utils.py +++ b/platform_utils.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2016 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/platform_utils_win32.py b/platform_utils_win32.py index a6286374..26c8ad42 100644 --- a/platform_utils_win32.py +++ b/platform_utils_win32.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2016 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/progress.py b/progress.py index ff627980..9222fcfc 100644 --- a/progress.py +++ b/progress.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2009 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/project.py b/project.py index 343452ad..a9bca6db 100644 --- a/project.py +++ b/project.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2008 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import print_function import errno import filecmp import glob diff --git a/pyversion.py b/pyversion.py index 8dbf909b..a0cbf777 100644 --- a/pyversion.py +++ b/pyversion.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2013 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/repo_trace.py b/repo_trace.py index cd571f4c..7be0c045 100644 --- a/repo_trace.py +++ b/repo_trace.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2008 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -19,7 +17,6 @@ Activated via `repo --trace ...` or `REPO_TRACE=1 repo ...`. """ -from __future__ import print_function import sys import os diff --git a/run_tests b/run_tests index 30e7b55a..9f19e2e2 100755 --- a/run_tests +++ b/run_tests @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding:utf-8 -*- # Copyright 2019 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,8 +15,6 @@ """Wrapper to run pytest with the right settings.""" -from __future__ import print_function - import errno import os import shutil diff --git a/setup.py b/setup.py index 5aa15fe9..77b1435c 100755 --- a/setup.py +++ b/setup.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding:utf-8 -*- # Copyright 2019 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the 'License"); @@ -16,8 +15,6 @@ """Python packaging for repo.""" -from __future__ import print_function - import os import setuptools diff --git a/subcmds/__init__.py b/subcmds/__init__.py index c3de9d1e..051dda06 100644 --- a/subcmds/__init__.py +++ b/subcmds/__init__.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2008 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/subcmds/abandon.py b/subcmds/abandon.py index 33011210..359c431b 100644 --- a/subcmds/abandon.py +++ b/subcmds/abandon.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2008 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,8 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import print_function - from collections import defaultdict import sys diff --git a/subcmds/branches.py b/subcmds/branches.py index 2b1f8075..20f51693 100644 --- a/subcmds/branches.py +++ b/subcmds/branches.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2009 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import print_function import itertools import multiprocessing import sys diff --git a/subcmds/checkout.py b/subcmds/checkout.py index efa31d26..fbb13653 100644 --- a/subcmds/checkout.py +++ b/subcmds/checkout.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2009 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import print_function import sys from command import Command from progress import Progress diff --git a/subcmds/cherry_pick.py b/subcmds/cherry_pick.py index 3ad82109..c333fcf4 100644 --- a/subcmds/cherry_pick.py +++ b/subcmds/cherry_pick.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2010 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import print_function import re import sys from command import Command diff --git a/subcmds/diff.py b/subcmds/diff.py index 190b18f4..c987bf23 100644 --- a/subcmds/diff.py +++ b/subcmds/diff.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2008 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/subcmds/diffmanifests.py b/subcmds/diffmanifests.py index 409bbdac..8ff212ed 100644 --- a/subcmds/diffmanifests.py +++ b/subcmds/diffmanifests.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2014 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/subcmds/download.py b/subcmds/download.py index 723124fd..c0c47dd9 100644 --- a/subcmds/download.py +++ b/subcmds/download.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2008 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import print_function import re import sys diff --git a/subcmds/forall.py b/subcmds/forall.py index 55d61ecb..c5864336 100644 --- a/subcmds/forall.py +++ b/subcmds/forall.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2008 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import print_function import errno import multiprocessing import re diff --git a/subcmds/gitc_delete.py b/subcmds/gitc_delete.py index 24d355a2..c6f02607 100644 --- a/subcmds/gitc_delete.py +++ b/subcmds/gitc_delete.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2015 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import print_function import sys from command import Command, GitcClientCommand diff --git a/subcmds/gitc_init.py b/subcmds/gitc_init.py index 30a9f7a5..7ecfdcac 100644 --- a/subcmds/gitc_init.py +++ b/subcmds/gitc_init.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2015 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import print_function import os import sys diff --git a/subcmds/grep.py b/subcmds/grep.py index 89611cd6..e3628c6a 100644 --- a/subcmds/grep.py +++ b/subcmds/grep.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2009 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,8 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import print_function - import sys from color import Coloring diff --git a/subcmds/help.py b/subcmds/help.py index c219a763..9ba9e706 100644 --- a/subcmds/help.py +++ b/subcmds/help.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2008 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import print_function import re import sys from formatter import AbstractFormatter, DumbWriter diff --git a/subcmds/info.py b/subcmds/info.py index 60149975..6381fa8e 100644 --- a/subcmds/info.py +++ b/subcmds/info.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2012 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/subcmds/init.py b/subcmds/init.py index af3685a0..e078fcbe 100644 --- a/subcmds/init.py +++ b/subcmds/init.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2008 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,8 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import print_function - import optparse import os import platform diff --git a/subcmds/list.py b/subcmds/list.py index 13cae5ff..a1247b75 100644 --- a/subcmds/list.py +++ b/subcmds/list.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2011 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,8 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import print_function - from command import Command, MirrorSafeCommand diff --git a/subcmds/manifest.py b/subcmds/manifest.py index 0052d7aa..e33e683c 100644 --- a/subcmds/manifest.py +++ b/subcmds/manifest.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2009 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,8 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import print_function - import json import os import sys diff --git a/subcmds/overview.py b/subcmds/overview.py index 08b58a6c..004a847c 100644 --- a/subcmds/overview.py +++ b/subcmds/overview.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2012 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import print_function from color import Coloring from command import PagedCommand diff --git a/subcmds/prune.py b/subcmds/prune.py index e90ff213..8cad8122 100644 --- a/subcmds/prune.py +++ b/subcmds/prune.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2008 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import print_function from color import Coloring from command import PagedCommand diff --git a/subcmds/rebase.py b/subcmds/rebase.py index 24d80bfd..cf536e9d 100644 --- a/subcmds/rebase.py +++ b/subcmds/rebase.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2010 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import print_function import sys from color import Coloring diff --git a/subcmds/selfupdate.py b/subcmds/selfupdate.py index bf6256ab..388881d9 100644 --- a/subcmds/selfupdate.py +++ b/subcmds/selfupdate.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2009 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import print_function from optparse import SUPPRESS_HELP import sys diff --git a/subcmds/smartsync.py b/subcmds/smartsync.py index 6037e5a3..c7d1d4d4 100644 --- a/subcmds/smartsync.py +++ b/subcmds/smartsync.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2010 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/subcmds/stage.py b/subcmds/stage.py index 4dce5ce5..98b30221 100644 --- a/subcmds/stage.py +++ b/subcmds/stage.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2008 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import print_function import sys from color import Coloring diff --git a/subcmds/start.py b/subcmds/start.py index adc6d293..7684b6d7 100644 --- a/subcmds/start.py +++ b/subcmds/start.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2008 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import print_function import os import sys diff --git a/subcmds/status.py b/subcmds/status.py index dfa974e9..e293d75c 100644 --- a/subcmds/status.py +++ b/subcmds/status.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2008 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,8 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import print_function - import functools import glob import multiprocessing diff --git a/subcmds/sync.py b/subcmds/sync.py index f5a7b0e6..1e1f2fc1 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2008 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,8 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import print_function - import json import netrc from optparse import SUPPRESS_HELP diff --git a/subcmds/upload.py b/subcmds/upload.py index 6196fe4c..c189e65f 100644 --- a/subcmds/upload.py +++ b/subcmds/upload.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2008 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import print_function import copy import re import sys diff --git a/subcmds/version.py b/subcmds/version.py index 6a7921df..000abf09 100644 --- a/subcmds/version.py +++ b/subcmds/version.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2009 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,8 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import print_function - import platform import sys diff --git a/tests/test_editor.py b/tests/test_editor.py index fbcfcdbd..cfd4f5ed 100644 --- a/tests/test_editor.py +++ b/tests/test_editor.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2019 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,8 +14,6 @@ """Unittests for the editor.py module.""" -from __future__ import print_function - import unittest from editor import Editor diff --git a/tests/test_git_command.py b/tests/test_git_command.py index 2c22b250..912a9dbe 100644 --- a/tests/test_git_command.py +++ b/tests/test_git_command.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright 2019 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,8 +14,6 @@ """Unittests for the git_command.py module.""" -from __future__ import print_function - import re import unittest diff --git a/tests/test_git_config.py b/tests/test_git_config.py index 4541b35c..964bc324 100644 --- a/tests/test_git_config.py +++ b/tests/test_git_config.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2009 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,8 +14,6 @@ """Unittests for the git_config.py module.""" -from __future__ import print_function - import os import unittest diff --git a/tests/test_hooks.py b/tests/test_hooks.py index ed8268df..6632b3e5 100644 --- a/tests/test_hooks.py +++ b/tests/test_hooks.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2019 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,8 +14,6 @@ """Unittests for the hooks.py module.""" -from __future__ import print_function - import hooks import unittest @@ -28,7 +24,6 @@ class RepoHookShebang(unittest.TestCase): """Lines w/out shebangs should be rejected.""" DATA = ( '', - '# -*- coding:utf-8 -*-\n', '#\n# foo\n', '# Bad shebang in script\n#!/foo\n' ) diff --git a/tests/test_manifest_xml.py b/tests/test_manifest_xml.py index 2a8c3f66..d53ea568 100644 --- a/tests/test_manifest_xml.py +++ b/tests/test_manifest_xml.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2019 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,8 +14,6 @@ """Unittests for the manifest_xml.py module.""" -from __future__ import print_function - import os import shutil import tempfile diff --git a/tests/test_project.py b/tests/test_project.py index 02285e2f..7dfbabb3 100644 --- a/tests/test_project.py +++ b/tests/test_project.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2019 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,8 +14,6 @@ """Unittests for the project.py module.""" -from __future__ import print_function - import contextlib import os import shutil diff --git a/tests/test_wrapper.py b/tests/test_wrapper.py index d7e5800f..5e2cfa57 100644 --- a/tests/test_wrapper.py +++ b/tests/test_wrapper.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2015 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,8 +14,6 @@ """Unittests for the wrapper.py module.""" -from __future__ import print_function - import contextlib import os import re diff --git a/wrapper.py b/wrapper.py index 81302985..b1aa4c50 100644 --- a/wrapper.py +++ b/wrapper.py @@ -1,5 +1,3 @@ -# -*- coding:utf-8 -*- -# # Copyright (C) 2014 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import print_function try: from importlib.machinery import SourceFileLoader _loader = lambda *args: SourceFileLoader(*args).load_module()