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 7df2022..fdd7253 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 b1fa0ef..ef2554d 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 4306836..b84a42d 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 cfed808..225eb59 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 5dd9db6..c77c564 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 1cb8f1a..b29d240 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 9af90df..fd8e926 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 e2b62ab..3c8a986 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 6354702..89cfbec 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 1abba0c..f805de6 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 ebfa652..cd0b862 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 0065931..bbecb93 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 167f003..352923d 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 d10e888..6dd3385 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 a628637..26c8ad4 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 ff62798..9222fcf 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 343452a..a9bca6d 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 8dbf909..a0cbf77 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 cd571f4..7be0c04 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 30e7b55..9f19e2e 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 5aa15fe..77b1435 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 c3de9d1..051dda0 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 3301121..359c431 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 2b1f807..20f5169 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 efa31d2..fbb1365 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 3ad8210..c333fcf 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 190b18f..c987bf2 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 409bbda..8ff212e 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 723124f..c0c47dd 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 55d61ec..c586433 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 24d355a..c6f0260 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 30a9f7a..7ecfdca 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 89611cd..e3628c6 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 c219a76..9ba9e70 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 6014997..6381fa8 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 af3685a..e078fcb 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 13cae5f..a1247b7 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 0052d7a..e33e683 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 08b58a6..004a847 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 e90ff21..8cad812 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 24d80bf..cf536e9 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 bf6256a..388881d 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 6037e5a..c7d1d4d 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 4dce5ce..98b3022 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 adc6d29..7684b6d 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 dfa974e..e293d75 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 f5a7b0e..1e1f2fc 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 6196fe4..c189e65 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 6a7921d..000abf0 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 fbcfcdb..cfd4f5e 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 2c22b25..912a9db 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 4541b35..964bc32 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 ed8268d..6632b3e 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 2a8c3f6..d53ea56 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 02285e2..7dfbabb 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 d7e5800..5e2cfa5 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 8130298..b1aa4c5 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()