From 784ccfc040dc8efa1a64d3c7d4070b66beb15d08 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Fri, 1 Jan 2021 08:42:31 -0500 Subject: 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 --- 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 ---- 28 files changed, 87 deletions(-) (limited to 'subcmds') 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 -- cgit v1.2.3-54-g00ecf