From fb493baad43e6fbce8a7012892f4f208134d37ea Mon Sep 17 00:00:00 2001 From: kranurag7 Date: Wed, 7 Feb 2024 17:05:26 +0530 Subject: [PATCH] update python scripts to python3 Signed-off-by: kranurag7 --- hack/boilerplate/boilerplate.py | 2 +- hack/boilerplate/boilerplate.py.txt | 2 +- hack/boilerplate/boilerplate_test.py | 4 ++-- hack/boilerplate/testdata/default/fail.py | 19 +---------------- hack/boilerplate/testdata/default/pass.py | 2 +- hack/boilerplate/testdata/with_config/fail.py | 21 ++----------------- hack/boilerplate/testdata/with_config/pass.py | 2 +- 7 files changed, 9 insertions(+), 43 deletions(-) diff --git a/hack/boilerplate/boilerplate.py b/hack/boilerplate/boilerplate.py index 506f8371..b616b0e4 100755 --- a/hack/boilerplate/boilerplate.py +++ b/hack/boilerplate/boilerplate.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright 2015 The Kubernetes Authors. # diff --git a/hack/boilerplate/boilerplate.py.txt b/hack/boilerplate/boilerplate.py.txt index a2e72e59..9fdb989c 100644 --- a/hack/boilerplate/boilerplate.py.txt +++ b/hack/boilerplate/boilerplate.py.txt @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright YEAR The Kubernetes Authors. # diff --git a/hack/boilerplate/boilerplate_test.py b/hack/boilerplate/boilerplate_test.py index 52579355..7c3efd8e 100644 --- a/hack/boilerplate/boilerplate_test.py +++ b/hack/boilerplate/boilerplate_test.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright 2016 The Kubernetes Authors. # @@ -40,7 +40,7 @@ class TestBoilerplate(unittest.TestCase): """ Note: run this test from the inside the boilerplate directory. - $ python -m unittest boilerplate_test + $ python3 -m unittest boilerplate_test """ def setUp(self): diff --git a/hack/boilerplate/testdata/default/fail.py b/hack/boilerplate/testdata/default/fail.py index 3c7033dd..8f6625c4 100644 --- a/hack/boilerplate/testdata/default/fail.py +++ b/hack/boilerplate/testdata/default/fail.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright 2023 The Kubernetes Authors. # @@ -14,20 +14,3 @@ # See the License for the specific language governing permissions and # limitations under the License. -#!/usr/bin/env python - -# Copyright 2015 The Kubernetes Authors. -# -# failed -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. diff --git a/hack/boilerplate/testdata/default/pass.py b/hack/boilerplate/testdata/default/pass.py index 5b7ce29a..0a0f9c9d 100644 --- a/hack/boilerplate/testdata/default/pass.py +++ b/hack/boilerplate/testdata/default/pass.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright 2015 The Kubernetes Authors. # diff --git a/hack/boilerplate/testdata/with_config/fail.py b/hack/boilerplate/testdata/with_config/fail.py index d4193660..df6cef91 100644 --- a/hack/boilerplate/testdata/with_config/fail.py +++ b/hack/boilerplate/testdata/with_config/fail.py @@ -1,6 +1,6 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 -# Copyright 2023 The Kubernetes Authors. +# Copyright 2024 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,20 +14,3 @@ # See the License for the specific language governing permissions and # limitations under the License. -#!/usr/bin/env python - -# Copyright 2015 The Kubernetes Authors. -# -# failed -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. \ No newline at end of file diff --git a/hack/boilerplate/testdata/with_config/pass.py b/hack/boilerplate/testdata/with_config/pass.py index 21d005d8..f652062f 100644 --- a/hack/boilerplate/testdata/with_config/pass.py +++ b/hack/boilerplate/testdata/with_config/pass.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright 2015 The Kubernetes Authors. #