summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Frysinger <vapier@google.com>2021-01-01 08:42:31 -0500
committerMike Frysinger <vapier@google.com>2021-01-06 18:53:05 +0000
commit784ccfc040dc8efa1a64d3c7d4070b66beb15d08 (patch)
tree6b144ebd88853d04ea270d14151d27f04e122730
parent1379a9b1851e203611c490218fe62ef808a7d0ae (diff)
downloadgit-repo-784ccfc040dc8efa1a64d3c7d4070b66beb15d08.tar.gz
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 <cjmcdonald@google.com> Tested-by: Mike Frysinger <vapier@google.com>
-rw-r--r--color.py2
-rw-r--r--command.py2
-rw-r--r--editor.py3
-rw-r--r--error.py2
-rw-r--r--event_log.py4
-rw-r--r--git_command.py3
-rw-r--r--git_config.py4
-rw-r--r--git_refs.py2
-rw-r--r--gitc_utils.py3
-rw-r--r--hooks.py2
-rwxr-xr-xmain.py2
-rw-r--r--manifest_xml.py3
-rw-r--r--pager.py3
-rw-r--r--platform_utils.py2
-rw-r--r--platform_utils_win32.py2
-rw-r--r--progress.py2
-rw-r--r--project.py3
-rw-r--r--pyversion.py2
-rw-r--r--repo_trace.py3
-rwxr-xr-xrun_tests3
-rwxr-xr-xsetup.py3
-rw-r--r--subcmds/__init__.py2
-rw-r--r--subcmds/abandon.py4
-rw-r--r--subcmds/branches.py3
-rw-r--r--subcmds/checkout.py3
-rw-r--r--subcmds/cherry_pick.py3
-rw-r--r--subcmds/diff.py2
-rw-r--r--subcmds/diffmanifests.py2
-rw-r--r--subcmds/download.py3
-rw-r--r--subcmds/forall.py3
-rw-r--r--subcmds/gitc_delete.py3
-rw-r--r--subcmds/gitc_init.py3
-rw-r--r--subcmds/grep.py4
-rw-r--r--subcmds/help.py3
-rw-r--r--subcmds/info.py2
-rw-r--r--subcmds/init.py4
-rw-r--r--subcmds/list.py4
-rw-r--r--subcmds/manifest.py4
-rw-r--r--subcmds/overview.py3
-rw-r--r--subcmds/prune.py3
-rw-r--r--subcmds/rebase.py3
-rw-r--r--subcmds/selfupdate.py3
-rw-r--r--subcmds/smartsync.py2
-rw-r--r--subcmds/stage.py3
-rw-r--r--subcmds/start.py3
-rw-r--r--subcmds/status.py4
-rw-r--r--subcmds/sync.py4
-rw-r--r--subcmds/upload.py3
-rw-r--r--subcmds/version.py4
-rw-r--r--tests/test_editor.py4
-rw-r--r--tests/test_git_command.py4
-rw-r--r--tests/test_git_config.py4
-rw-r--r--tests/test_hooks.py5
-rw-r--r--tests/test_manifest_xml.py4
-rw-r--r--tests/test_project.py4
-rw-r--r--tests/test_wrapper.py4
-rw-r--r--wrapper.py3
57 files changed, 0 insertions, 174 deletions
diff --git a/color.py b/color.py
index 7df20223..fdd72534 100644
--- a/color.py
+++ b/color.py
@@ -1,5 +1,3 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2008 The Android Open Source Project 1# Copyright (C) 2008 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# 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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2008 The Android Open Source Project 1# Copyright (C) 2008 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# 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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2008 The Android Open Source Project 1# Copyright (C) 2008 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,7 +12,6 @@
14# See the License for the specific language governing permissions and 12# See the License for the specific language governing permissions and
15# limitations under the License. 13# limitations under the License.
16 14
17from __future__ import print_function
18import os 15import os
19import re 16import re
20import sys 17import sys
diff --git a/error.py b/error.py
index cfed8083..225eb59d 100644
--- a/error.py
+++ b/error.py
@@ -1,5 +1,3 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2008 The Android Open Source Project 1# Copyright (C) 2008 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# 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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2017 The Android Open Source Project 1# Copyright (C) 2017 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,8 +12,6 @@
14# See the License for the specific language governing permissions and 12# See the License for the specific language governing permissions and
15# limitations under the License. 13# limitations under the License.
16 14
17from __future__ import print_function
18
19import json 15import json
20import multiprocessing 16import multiprocessing
21 17
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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2008 The Android Open Source Project 1# Copyright (C) 2008 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,7 +12,6 @@
14# See the License for the specific language governing permissions and 12# See the License for the specific language governing permissions and
15# limitations under the License. 13# limitations under the License.
16 14
17from __future__ import print_function
18import os 15import os
19import re 16import re
20import sys 17import 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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2008 The Android Open Source Project 1# Copyright (C) 2008 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,8 +12,6 @@
14# See the License for the specific language governing permissions and 12# See the License for the specific language governing permissions and
15# limitations under the License. 13# limitations under the License.
16 14
17from __future__ import print_function
18
19import contextlib 15import contextlib
20import errno 16import errno
21import json 17import 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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2009 The Android Open Source Project 1# Copyright (C) 2009 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# 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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2015 The Android Open Source Project 1# Copyright (C) 2015 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,7 +12,6 @@
14# See the License for the specific language governing permissions and 12# See the License for the specific language governing permissions and
15# limitations under the License. 13# limitations under the License.
16 14
17from __future__ import print_function
18import os 15import os
19import platform 16import platform
20import re 17import re
diff --git a/hooks.py b/hooks.py
index 1abba0c4..f805de6b 100644
--- a/hooks.py
+++ b/hooks.py
@@ -1,5 +1,3 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2008 The Android Open Source Project 1# Copyright (C) 2008 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# 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 @@
1#!/usr/bin/env python3 1#!/usr/bin/env python3
2# -*- coding:utf-8 -*-
3# 2#
4# Copyright (C) 2008 The Android Open Source Project 3# Copyright (C) 2008 The Android Open Source Project
5# 4#
@@ -21,7 +20,6 @@ People shouldn't run this directly; instead, they should use the `repo` wrapper
21which takes care of execing this entry point. 20which takes care of execing this entry point.
22""" 21"""
23 22
24from __future__ import print_function
25import getpass 23import getpass
26import netrc 24import netrc
27import optparse 25import 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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2008 The Android Open Source Project 1# Copyright (C) 2008 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,7 +12,6 @@
14# See the License for the specific language governing permissions and 12# See the License for the specific language governing permissions and
15# limitations under the License. 13# limitations under the License.
16 14
17from __future__ import print_function
18import itertools 15import itertools
19import os 16import os
20import re 17import re
diff --git a/pager.py b/pager.py
index 167f003f..352923d9 100644
--- a/pager.py
+++ b/pager.py
@@ -1,5 +1,3 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2008 The Android Open Source Project 1# Copyright (C) 2008 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,7 +12,6 @@
14# See the License for the specific language governing permissions and 12# See the License for the specific language governing permissions and
15# limitations under the License. 13# limitations under the License.
16 14
17from __future__ import print_function
18import os 15import os
19import select 16import select
20import subprocess 17import 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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2016 The Android Open Source Project 1# Copyright (C) 2016 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# 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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2016 The Android Open Source Project 1# Copyright (C) 2016 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# 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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2009 The Android Open Source Project 1# Copyright (C) 2009 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# 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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2008 The Android Open Source Project 1# Copyright (C) 2008 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,7 +12,6 @@
14# See the License for the specific language governing permissions and 12# See the License for the specific language governing permissions and
15# limitations under the License. 13# limitations under the License.
16 14
17from __future__ import print_function
18import errno 15import errno
19import filecmp 16import filecmp
20import glob 17import glob
diff --git a/pyversion.py b/pyversion.py
index 8dbf909b..a0cbf777 100644
--- a/pyversion.py
+++ b/pyversion.py
@@ -1,5 +1,3 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2013 The Android Open Source Project 1# Copyright (C) 2013 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# 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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2008 The Android Open Source Project 1# Copyright (C) 2008 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# Licensed under the Apache License, Version 2.0 (the "License");
@@ -19,7 +17,6 @@
19Activated via `repo --trace ...` or `REPO_TRACE=1 repo ...`. 17Activated via `repo --trace ...` or `REPO_TRACE=1 repo ...`.
20""" 18"""
21 19
22from __future__ import print_function
23import sys 20import sys
24import os 21import os
25 22
diff --git a/run_tests b/run_tests
index 30e7b55a..9f19e2e2 100755
--- a/run_tests
+++ b/run_tests
@@ -1,5 +1,4 @@
1#!/usr/bin/env python3 1#!/usr/bin/env python3
2# -*- coding:utf-8 -*-
3# Copyright 2019 The Android Open Source Project 2# Copyright 2019 The Android Open Source Project
4# 3#
5# Licensed under the Apache License, Version 2.0 (the "License"); 4# Licensed under the Apache License, Version 2.0 (the "License");
@@ -16,8 +15,6 @@
16 15
17"""Wrapper to run pytest with the right settings.""" 16"""Wrapper to run pytest with the right settings."""
18 17
19from __future__ import print_function
20
21import errno 18import errno
22import os 19import os
23import shutil 20import shutil
diff --git a/setup.py b/setup.py
index 5aa15fe9..77b1435c 100755
--- a/setup.py
+++ b/setup.py
@@ -1,5 +1,4 @@
1#!/usr/bin/env python3 1#!/usr/bin/env python3
2# -*- coding:utf-8 -*-
3# Copyright 2019 The Android Open Source Project 2# Copyright 2019 The Android Open Source Project
4# 3#
5# Licensed under the Apache License, Version 2.0 (the 'License"); 4# Licensed under the Apache License, Version 2.0 (the 'License");
@@ -16,8 +15,6 @@
16 15
17"""Python packaging for repo.""" 16"""Python packaging for repo."""
18 17
19from __future__ import print_function
20
21import os 18import os
22import setuptools 19import setuptools
23 20
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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2008 The Android Open Source Project 1# Copyright (C) 2008 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# 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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2008 The Android Open Source Project 1# Copyright (C) 2008 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,8 +12,6 @@
14# See the License for the specific language governing permissions and 12# See the License for the specific language governing permissions and
15# limitations under the License. 13# limitations under the License.
16 14
17from __future__ import print_function
18
19from collections import defaultdict 15from collections import defaultdict
20import sys 16import sys
21 17
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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2009 The Android Open Source Project 1# Copyright (C) 2009 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,7 +12,6 @@
14# See the License for the specific language governing permissions and 12# See the License for the specific language governing permissions and
15# limitations under the License. 13# limitations under the License.
16 14
17from __future__ import print_function
18import itertools 15import itertools
19import multiprocessing 16import multiprocessing
20import sys 17import 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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2009 The Android Open Source Project 1# Copyright (C) 2009 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,7 +12,6 @@
14# See the License for the specific language governing permissions and 12# See the License for the specific language governing permissions and
15# limitations under the License. 13# limitations under the License.
16 14
17from __future__ import print_function
18import sys 15import sys
19from command import Command 16from command import Command
20from progress import Progress 17from 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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2010 The Android Open Source Project 1# Copyright (C) 2010 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,7 +12,6 @@
14# See the License for the specific language governing permissions and 12# See the License for the specific language governing permissions and
15# limitations under the License. 13# limitations under the License.
16 14
17from __future__ import print_function
18import re 15import re
19import sys 16import sys
20from command import Command 17from 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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2008 The Android Open Source Project 1# Copyright (C) 2008 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# 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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2014 The Android Open Source Project 1# Copyright (C) 2014 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# 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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2008 The Android Open Source Project 1# Copyright (C) 2008 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,7 +12,6 @@
14# See the License for the specific language governing permissions and 12# See the License for the specific language governing permissions and
15# limitations under the License. 13# limitations under the License.
16 14
17from __future__ import print_function
18import re 15import re
19import sys 16import sys
20 17
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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2008 The Android Open Source Project 1# Copyright (C) 2008 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,7 +12,6 @@
14# See the License for the specific language governing permissions and 12# See the License for the specific language governing permissions and
15# limitations under the License. 13# limitations under the License.
16 14
17from __future__ import print_function
18import errno 15import errno
19import multiprocessing 16import multiprocessing
20import re 17import 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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2015 The Android Open Source Project 1# Copyright (C) 2015 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,7 +12,6 @@
14# See the License for the specific language governing permissions and 12# See the License for the specific language governing permissions and
15# limitations under the License. 13# limitations under the License.
16 14
17from __future__ import print_function
18import sys 15import sys
19 16
20from command import Command, GitcClientCommand 17from 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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2015 The Android Open Source Project 1# Copyright (C) 2015 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,7 +12,6 @@
14# See the License for the specific language governing permissions and 12# See the License for the specific language governing permissions and
15# limitations under the License. 13# limitations under the License.
16 14
17from __future__ import print_function
18import os 15import os
19import sys 16import sys
20 17
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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2009 The Android Open Source Project 1# Copyright (C) 2009 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,8 +12,6 @@
14# See the License for the specific language governing permissions and 12# See the License for the specific language governing permissions and
15# limitations under the License. 13# limitations under the License.
16 14
17from __future__ import print_function
18
19import sys 15import sys
20 16
21from color import Coloring 17from 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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2008 The Android Open Source Project 1# Copyright (C) 2008 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,7 +12,6 @@
14# See the License for the specific language governing permissions and 12# See the License for the specific language governing permissions and
15# limitations under the License. 13# limitations under the License.
16 14
17from __future__ import print_function
18import re 15import re
19import sys 16import sys
20from formatter import AbstractFormatter, DumbWriter 17from 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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2012 The Android Open Source Project 1# Copyright (C) 2012 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# 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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2008 The Android Open Source Project 1# Copyright (C) 2008 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,8 +12,6 @@
14# See the License for the specific language governing permissions and 12# See the License for the specific language governing permissions and
15# limitations under the License. 13# limitations under the License.
16 14
17from __future__ import print_function
18
19import optparse 15import optparse
20import os 16import os
21import platform 17import 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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2011 The Android Open Source Project 1# Copyright (C) 2011 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,8 +12,6 @@
14# See the License for the specific language governing permissions and 12# See the License for the specific language governing permissions and
15# limitations under the License. 13# limitations under the License.
16 14
17from __future__ import print_function
18
19from command import Command, MirrorSafeCommand 15from command import Command, MirrorSafeCommand
20 16
21 17
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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2009 The Android Open Source Project 1# Copyright (C) 2009 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,8 +12,6 @@
14# See the License for the specific language governing permissions and 12# See the License for the specific language governing permissions and
15# limitations under the License. 13# limitations under the License.
16 14
17from __future__ import print_function
18
19import json 15import json
20import os 16import os
21import sys 17import 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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2012 The Android Open Source Project 1# Copyright (C) 2012 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,7 +12,6 @@
14# See the License for the specific language governing permissions and 12# See the License for the specific language governing permissions and
15# limitations under the License. 13# limitations under the License.
16 14
17from __future__ import print_function
18from color import Coloring 15from color import Coloring
19from command import PagedCommand 16from command import PagedCommand
20 17
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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2008 The Android Open Source Project 1# Copyright (C) 2008 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,7 +12,6 @@
14# See the License for the specific language governing permissions and 12# See the License for the specific language governing permissions and
15# limitations under the License. 13# limitations under the License.
16 14
17from __future__ import print_function
18from color import Coloring 15from color import Coloring
19from command import PagedCommand 16from command import PagedCommand
20 17
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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2010 The Android Open Source Project 1# Copyright (C) 2010 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,7 +12,6 @@
14# See the License for the specific language governing permissions and 12# See the License for the specific language governing permissions and
15# limitations under the License. 13# limitations under the License.
16 14
17from __future__ import print_function
18import sys 15import sys
19 16
20from color import Coloring 17from 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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2009 The Android Open Source Project 1# Copyright (C) 2009 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,7 +12,6 @@
14# See the License for the specific language governing permissions and 12# See the License for the specific language governing permissions and
15# limitations under the License. 13# limitations under the License.
16 14
17from __future__ import print_function
18from optparse import SUPPRESS_HELP 15from optparse import SUPPRESS_HELP
19import sys 16import sys
20 17
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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2010 The Android Open Source Project 1# Copyright (C) 2010 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# 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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2008 The Android Open Source Project 1# Copyright (C) 2008 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,7 +12,6 @@
14# See the License for the specific language governing permissions and 12# See the License for the specific language governing permissions and
15# limitations under the License. 13# limitations under the License.
16 14
17from __future__ import print_function
18import sys 15import sys
19 16
20from color import Coloring 17from 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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2008 The Android Open Source Project 1# Copyright (C) 2008 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,7 +12,6 @@
14# See the License for the specific language governing permissions and 12# See the License for the specific language governing permissions and
15# limitations under the License. 13# limitations under the License.
16 14
17from __future__ import print_function
18import os 15import os
19import sys 16import sys
20 17
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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2008 The Android Open Source Project 1# Copyright (C) 2008 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,8 +12,6 @@
14# See the License for the specific language governing permissions and 12# See the License for the specific language governing permissions and
15# limitations under the License. 13# limitations under the License.
16 14
17from __future__ import print_function
18
19import functools 15import functools
20import glob 16import glob
21import multiprocessing 17import 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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2008 The Android Open Source Project 1# Copyright (C) 2008 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,8 +12,6 @@
14# See the License for the specific language governing permissions and 12# See the License for the specific language governing permissions and
15# limitations under the License. 13# limitations under the License.
16 14
17from __future__ import print_function
18
19import json 15import json
20import netrc 16import netrc
21from optparse import SUPPRESS_HELP 17from 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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2008 The Android Open Source Project 1# Copyright (C) 2008 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,7 +12,6 @@
14# See the License for the specific language governing permissions and 12# See the License for the specific language governing permissions and
15# limitations under the License. 13# limitations under the License.
16 14
17from __future__ import print_function
18import copy 15import copy
19import re 16import re
20import sys 17import 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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2009 The Android Open Source Project 1# Copyright (C) 2009 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,8 +12,6 @@
14# See the License for the specific language governing permissions and 12# See the License for the specific language governing permissions and
15# limitations under the License. 13# limitations under the License.
16 14
17from __future__ import print_function
18
19import platform 15import platform
20import sys 16import sys
21 17
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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2019 The Android Open Source Project 1# Copyright (C) 2019 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# Licensed under the Apache License, Version 2.0 (the "License");
@@ -16,8 +14,6 @@
16 14
17"""Unittests for the editor.py module.""" 15"""Unittests for the editor.py module."""
18 16
19from __future__ import print_function
20
21import unittest 17import unittest
22 18
23from editor import Editor 19from 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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright 2019 The Android Open Source Project 1# Copyright 2019 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# Licensed under the Apache License, Version 2.0 (the "License");
@@ -16,8 +14,6 @@
16 14
17"""Unittests for the git_command.py module.""" 15"""Unittests for the git_command.py module."""
18 16
19from __future__ import print_function
20
21import re 17import re
22import unittest 18import unittest
23 19
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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2009 The Android Open Source Project 1# Copyright (C) 2009 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# Licensed under the Apache License, Version 2.0 (the "License");
@@ -16,8 +14,6 @@
16 14
17"""Unittests for the git_config.py module.""" 15"""Unittests for the git_config.py module."""
18 16
19from __future__ import print_function
20
21import os 17import os
22import unittest 18import unittest
23 19
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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2019 The Android Open Source Project 1# Copyright (C) 2019 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# Licensed under the Apache License, Version 2.0 (the "License");
@@ -16,8 +14,6 @@
16 14
17"""Unittests for the hooks.py module.""" 15"""Unittests for the hooks.py module."""
18 16
19from __future__ import print_function
20
21import hooks 17import hooks
22import unittest 18import unittest
23 19
@@ -28,7 +24,6 @@ class RepoHookShebang(unittest.TestCase):
28 """Lines w/out shebangs should be rejected.""" 24 """Lines w/out shebangs should be rejected."""
29 DATA = ( 25 DATA = (
30 '', 26 '',
31 '# -*- coding:utf-8 -*-\n',
32 '#\n# foo\n', 27 '#\n# foo\n',
33 '# Bad shebang in script\n#!/foo\n' 28 '# Bad shebang in script\n#!/foo\n'
34 ) 29 )
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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2019 The Android Open Source Project 1# Copyright (C) 2019 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# Licensed under the Apache License, Version 2.0 (the "License");
@@ -16,8 +14,6 @@
16 14
17"""Unittests for the manifest_xml.py module.""" 15"""Unittests for the manifest_xml.py module."""
18 16
19from __future__ import print_function
20
21import os 17import os
22import shutil 18import shutil
23import tempfile 19import 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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2019 The Android Open Source Project 1# Copyright (C) 2019 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# Licensed under the Apache License, Version 2.0 (the "License");
@@ -16,8 +14,6 @@
16 14
17"""Unittests for the project.py module.""" 15"""Unittests for the project.py module."""
18 16
19from __future__ import print_function
20
21import contextlib 17import contextlib
22import os 18import os
23import shutil 19import 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 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2015 The Android Open Source Project 1# Copyright (C) 2015 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# Licensed under the Apache License, Version 2.0 (the "License");
@@ -16,8 +14,6 @@
16 14
17"""Unittests for the wrapper.py module.""" 15"""Unittests for the wrapper.py module."""
18 16
19from __future__ import print_function
20
21import contextlib 17import contextlib
22import os 18import os
23import re 19import re
diff --git a/wrapper.py b/wrapper.py
index 81302985..b1aa4c50 100644
--- a/wrapper.py
+++ b/wrapper.py
@@ -1,5 +1,3 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2014 The Android Open Source Project 1# Copyright (C) 2014 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,7 +12,6 @@
14# See the License for the specific language governing permissions and 12# See the License for the specific language governing permissions and
15# limitations under the License. 13# limitations under the License.
16 14
17from __future__ import print_function
18try: 15try:
19 from importlib.machinery import SourceFileLoader 16 from importlib.machinery import SourceFileLoader
20 _loader = lambda *args: SourceFileLoader(*args).load_module() 17 _loader = lambda *args: SourceFileLoader(*args).load_module()