add coding:utf-8 to all python files The linter wants this to make sure we use UTF-8 encoding everywhere. BUG=None TEST=precq passes Change-Id: Id63f57f0b3ef25e04b02a94adae2f17cb1d34214 Reviewed-on: https://chromium-review.googlesource.com/1497252 Commit-Ready: Mike Frysinger <vapier@chromium.org> Tested-by: Mike Frysinger <vapier@chromium.org> Reviewed-by: Amin Hassani <ahassani@chromium.org>
diff --git a/au_test_harness/au_test.py b/au_test_harness/au_test.py index 97300a0..9cdef57 100644 --- a/au_test_harness/au_test.py +++ b/au_test_harness/au_test.py
@@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/au_test_harness/au_test_test.py b/au_test_harness/au_test_test.py index a42448b..9830f52 100755 --- a/au_test_harness/au_test_test.py +++ b/au_test_harness/au_test_test.py
@@ -1,5 +1,5 @@ #!/usr/bin/python2 -# +# -*- coding: utf-8 -*- # Copyright 2016 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/au_test_harness/au_worker.py b/au_test_harness/au_worker.py index 8bc16d0..90356a8 100644 --- a/au_test_harness/au_worker.py +++ b/au_test_harness/au_worker.py
@@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Copyright (c) 2012 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/au_test_harness/cros_au_test_harness.py b/au_test_harness/cros_au_test_harness.py index f029f01..b5b0f98 100755 --- a/au_test_harness/cros_au_test_harness.py +++ b/au_test_harness/cros_au_test_harness.py
@@ -1,5 +1,5 @@ #!/usr/bin/env python2 - +# -*- coding: utf-8 -*- # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/au_test_harness/cros_au_test_harness_unittest.py b/au_test_harness/cros_au_test_harness_unittest.py index ef9555f..371fec3 100755 --- a/au_test_harness/cros_au_test_harness_unittest.py +++ b/au_test_harness/cros_au_test_harness_unittest.py
@@ -1,5 +1,5 @@ #!/usr/bin/python2 -# +# -*- coding: utf-8 -*- # Copyright 2015 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/au_test_harness/cros_test_proxy.py b/au_test_harness/cros_test_proxy.py index 9a105f6..2a38f7a 100644 --- a/au_test_harness/cros_test_proxy.py +++ b/au_test_harness/cros_test_proxy.py
@@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/au_test_harness/gce_au_worker.py b/au_test_harness/gce_au_worker.py index 1c6ea97..9792639 100644 --- a/au_test_harness/gce_au_worker.py +++ b/au_test_harness/gce_au_worker.py
@@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Copyright 2015 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/au_test_harness/gce_au_worker_unittest.py b/au_test_harness/gce_au_worker_unittest.py index a69e75f..561dbc1 100755 --- a/au_test_harness/gce_au_worker_unittest.py +++ b/au_test_harness/gce_au_worker_unittest.py
@@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# +# -*- coding: utf-8 -*- # Copyright 2015 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/au_test_harness/real_au_worker.py b/au_test_harness/real_au_worker.py index 8a6a74c..2a21661 100644 --- a/au_test_harness/real_au_worker.py +++ b/au_test_harness/real_au_worker.py
@@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/au_test_harness/update_exception.py b/au_test_harness/update_exception.py index 761e514..4cbf831 100644 --- a/au_test_harness/update_exception.py +++ b/au_test_harness/update_exception.py
@@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/audio-scripts/fetch_test_data.py b/audio-scripts/fetch_test_data.py index f80e821..d300541 100755 --- a/audio-scripts/fetch_test_data.py +++ b/audio-scripts/fetch_test_data.py
@@ -1,5 +1,5 @@ #!/usr/bin/python -# +# -*- coding: utf-8 -*- # Copyright 2014 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/audio-scripts/filter_test_data.py b/audio-scripts/filter_test_data.py index 8c4c2d7..2fd7e63 100755 --- a/audio-scripts/filter_test_data.py +++ b/audio-scripts/filter_test_data.py
@@ -1,5 +1,5 @@ #!/usr/bin/python -# +# -*- coding: utf-8 -*- # Copyright 2014 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/audio-scripts/utils.py b/audio-scripts/utils.py index 6586246..3d88fd5 100644 --- a/audio-scripts/utils.py +++ b/audio-scripts/utils.py
@@ -1,5 +1,5 @@ #!/usr/bin/python -# +# -*- coding: utf-8 -*- # Copyright 2014 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/call_autoserv.py b/call_autoserv.py index 65c00a5..ad54a9a 100755 --- a/call_autoserv.py +++ b/call_autoserv.py
@@ -1,5 +1,5 @@ #!/usr/bin/python - +# -*- coding: utf-8 -*- # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/cros_gestures/cros_gestures b/cros_gestures/cros_gestures index de24fd7..7a2ffc3 100755 --- a/cros_gestures/cros_gestures +++ b/cros_gestures/cros_gestures
@@ -1,4 +1,5 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- # Copyright (c) 2012 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/cros_gestures/cros_gestures_admin b/cros_gestures/cros_gestures_admin index f9684d5..9f09db6 100755 --- a/cros_gestures/cros_gestures_admin +++ b/cros_gestures/cros_gestures_admin
@@ -1,4 +1,5 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- # Copyright (c) 2012 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/cros_gestures/cros_gestures_commands.py b/cros_gestures/cros_gestures_commands.py index db395f1..6fc8819 100644 --- a/cros_gestures/cros_gestures_commands.py +++ b/cros_gestures/cros_gestures_commands.py
@@ -1,4 +1,5 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- # Copyright (c) 2012 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/cros_gestures/cros_gestures_constants.py b/cros_gestures/cros_gestures_constants.py index 396fded..e7abba1 100644 --- a/cros_gestures/cros_gestures_constants.py +++ b/cros_gestures/cros_gestures_constants.py
@@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Copyright (c) 2012 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/cros_gestures/cros_gestures_logging.py b/cros_gestures/cros_gestures_logging.py index 95c7814..49632fd 100644 --- a/cros_gestures/cros_gestures_logging.py +++ b/cros_gestures/cros_gestures_logging.py
@@ -1,4 +1,5 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- # Copyright (c) 2012 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/cros_gestures/cros_gestures_options.py b/cros_gestures/cros_gestures_options.py index cb7f368..4f1be6b 100644 --- a/cros_gestures/cros_gestures_options.py +++ b/cros_gestures/cros_gestures_options.py
@@ -1,4 +1,5 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/cros_gestures/cros_gestures_utils.py b/cros_gestures/cros_gestures_utils.py index c55f6bb..59fe5ba 100644 --- a/cros_gestures/cros_gestures_utils.py +++ b/cros_gestures/cros_gestures_utils.py
@@ -1,4 +1,5 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- # Copyright (c) 2012 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/cros_gestures/exception.py b/cros_gestures/exception.py index 609d9e5..8d04115 100644 --- a/cros_gestures/exception.py +++ b/cros_gestures/exception.py
@@ -1,4 +1,5 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/cros_gestures/remote/install_cros_gestures.py b/cros_gestures/remote/install_cros_gestures.py index 957712d..48fc92e 100755 --- a/cros_gestures/remote/install_cros_gestures.py +++ b/cros_gestures/remote/install_cros_gestures.py
@@ -1,4 +1,5 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- # Copyright (c) 2012 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/cros_gestures/run_remote_tool b/cros_gestures/run_remote_tool index 8f315b6..717a0d8 100755 --- a/cros_gestures/run_remote_tool +++ b/cros_gestures/run_remote_tool
@@ -1,4 +1,5 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/generate_test_payloads/cros_generate_test_payloads.py b/generate_test_payloads/cros_generate_test_payloads.py index 19e3470..793ebb8 100755 --- a/generate_test_payloads/cros_generate_test_payloads.py +++ b/generate_test_payloads/cros_generate_test_payloads.py
@@ -1,5 +1,5 @@ #!/usr/bin/python2 -# +# -*- coding: utf-8 -*- # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/generate_test_payloads/payload_generation_exception.py b/generate_test_payloads/payload_generation_exception.py index f8c6911..d4bf537 100644 --- a/generate_test_payloads/payload_generation_exception.py +++ b/generate_test_payloads/payload_generation_exception.py
@@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/lib/constants.py b/lib/constants.py index 25c4866..ccc5527 100644 --- a/lib/constants.py +++ b/lib/constants.py
@@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/lib/image_extractor.py b/lib/image_extractor.py index 26de362..eb4f81e 100644 --- a/lib/image_extractor.py +++ b/lib/image_extractor.py
@@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Copyright (c) 2012 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/lib/image_extractor_unittest.py b/lib/image_extractor_unittest.py index c359740..0a37cbd 100755 --- a/lib/image_extractor_unittest.py +++ b/lib/image_extractor_unittest.py
@@ -1,5 +1,5 @@ #!/usr/bin/python -# +# -*- coding: utf-8 -*- # Copyright (c) 2012 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/lib/mount_helper.py b/lib/mount_helper.py index 308db9d..2545f8c 100644 --- a/lib/mount_helper.py +++ b/lib/mount_helper.py
@@ -1,8 +1,9 @@ +# -*- coding: utf-8 -*- # Copyright (c) 2013 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -# Module containing helper methods for mounting and unmounting an image. +"""Module containing helper methods for mounting and unmounting an image.""" import os
diff --git a/lib/public_key_manager.py b/lib/public_key_manager.py index c0ddb42..5d77682 100644 --- a/lib/public_key_manager.py +++ b/lib/public_key_manager.py
@@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/lib/test_helper.py b/lib/test_helper.py index 4206438..b846bb2 100644 --- a/lib/test_helper.py +++ b/lib/test_helper.py
@@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/provingground/browsertest_status/browsertest_status.py b/provingground/browsertest_status/browsertest_status.py index 27486ba..a79c054 100755 --- a/provingground/browsertest_status/browsertest_status.py +++ b/provingground/browsertest_status/browsertest_status.py
@@ -1,4 +1,5 @@ #!/usr/bin/python2 +# -*- coding: utf-8 -*- # Copyright 2015 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/provingground/chaosap/ap_spec.py b/provingground/chaosap/ap_spec.py index 12f5f13..8eba2a8 100644 --- a/provingground/chaosap/ap_spec.py +++ b/provingground/chaosap/ap_spec.py
@@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/provingground/chaosap/appengine_config.py b/provingground/chaosap/appengine_config.py index 893e0bd..260abf3 100644 --- a/provingground/chaosap/appengine_config.py +++ b/provingground/chaosap/appengine_config.py
@@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/provingground/chaosap/chaos_unittest.py b/provingground/chaosap/chaos_unittest.py index 40cf1cf..527437b 100644 --- a/provingground/chaosap/chaos_unittest.py +++ b/provingground/chaosap/chaos_unittest.py
@@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- + import unittest import requests import json @@ -58,4 +60,4 @@ "router_name":"newroutername", 'result': True}) if __name__ == "__main__": - unittest.main() \ No newline at end of file + unittest.main()
diff --git a/provingground/chaosap/main.py b/provingground/chaosap/main.py index 96cd619..b386d8a 100644 --- a/provingground/chaosap/main.py +++ b/provingground/chaosap/main.py
@@ -1,4 +1,5 @@ #!flask/bin/python +# -*- coding: utf-8 -*- # Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/provingground/chaosap/ndb_json.py b/provingground/chaosap/ndb_json.py index ee397c0..0437eb4 100644 --- a/provingground/chaosap/ndb_json.py +++ b/provingground/chaosap/ndb_json.py
@@ -1,4 +1,6 @@ #!/usr/bin/env python +# -*- coding: utf-8 -*- + """ JSON encoder/decoder adapted for use with Google App Engine NDB. Usage:
diff --git a/provingground/cros_perf/perf_results.py b/provingground/cros_perf/perf_results.py index b536bf8..2cf2fdd 100644 --- a/provingground/cros_perf/perf_results.py +++ b/provingground/cros_perf/perf_results.py
@@ -1,4 +1,5 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- # Copyright 2014 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/provingground/crosdl.py b/provingground/crosdl.py index e737291..487e4cd 100755 --- a/provingground/crosdl.py +++ b/provingground/crosdl.py
@@ -1,4 +1,5 @@ #!/usr/bin/env python2 +# -*- coding: utf-8 -*- # Copyright (c) 2014 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/provingground/cts/lib/upload_utils.py b/provingground/cts/lib/upload_utils.py index 1105f65..01e5835 100755 --- a/provingground/cts/lib/upload_utils.py +++ b/provingground/cts/lib/upload_utils.py
@@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# +# -*- coding: utf-8 -*- # Copyright 2017 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/provingground/cts/upload_cts.py b/provingground/cts/upload_cts.py index 052ba24..e4914ef 100755 --- a/provingground/cts/upload_cts.py +++ b/provingground/cts/upload_cts.py
@@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# +# -*- coding: utf-8 -*- # Copyright 2017 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/provingground/cts/upload_cts_verifier.py b/provingground/cts/upload_cts_verifier.py index c7028f8..cb85318 100755 --- a/provingground/cts/upload_cts_verifier.py +++ b/provingground/cts/upload_cts_verifier.py
@@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# +# -*- coding: utf-8 -*- # Copyright 2017 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/provingground/download_test_build.py b/provingground/download_test_build.py index 6e2d82e..0d9c462 100755 --- a/provingground/download_test_build.py +++ b/provingground/download_test_build.py
@@ -1,4 +1,5 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- # Copyright (c) 2013 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/provingground/platform_whitelist_tools/fetch_commons.py b/provingground/platform_whitelist_tools/fetch_commons.py index 18ebd07..4afcb1d 100644 --- a/provingground/platform_whitelist_tools/fetch_commons.py +++ b/provingground/platform_whitelist_tools/fetch_commons.py
@@ -1,4 +1,5 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- # Copyright (c) 2014 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file
diff --git a/provingground/platform_whitelist_tools/remove_from_whitelist.py b/provingground/platform_whitelist_tools/remove_from_whitelist.py index 2547dbb..db6d844 100644 --- a/provingground/platform_whitelist_tools/remove_from_whitelist.py +++ b/provingground/platform_whitelist_tools/remove_from_whitelist.py
@@ -1,4 +1,5 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- # Copyright (c) 2014 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/provingground/test_build_download.py b/provingground/test_build_download.py index 720facf..67b1d80 100644 --- a/provingground/test_build_download.py +++ b/provingground/test_build_download.py
@@ -1,4 +1,5 @@ #!/usr/sbin/python +# -*- coding: utf-8 -*- # Copyright (c) 2013 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/provingground/touch_firmware_versions.py b/provingground/touch_firmware_versions.py index c6d8c30..25b76e6 100755 --- a/provingground/touch_firmware_versions.py +++ b/provingground/touch_firmware_versions.py
@@ -1,4 +1,5 @@ #!/usr/bin/env python2 +# -*- coding: utf-8 -*- # Copyright 2016 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
diff --git a/provingground/transporter.py b/provingground/transporter.py index 10bb622..1e8a6f0 100755 --- a/provingground/transporter.py +++ b/provingground/transporter.py
@@ -1,4 +1,5 @@ #!/usr/bin/python3 +# -*- coding: utf-8 -*- # Copyright (c) 2013 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.