From 56c40d2bd67e5997eedd3cb8184762e273fb8fbc Mon Sep 17 00:00:00 2001 From: James Addison <55152140+jayaddison@users.noreply.github.com> Date: Tue, 28 Nov 2023 19:00:31 +0000 Subject: [PATCH] Remove unnecessary utf-8 header in license_headers.py (follow-up to #615) (#617) * License tools: remove utf-8 coding declaration from license_headers.py check/fix script; since #615 it is no longer used in the library's codebase UTF-8 is the default encoding used to read source code files for Python3 - see https://docs.python.org/3/howto/unicode.html#unicode-literals-in-python-source-code Signed-off-by: James Addison * Cleanup: remove utf-8 coding declaration from the license_headers.py script itself Signed-off-by: James Addison * Update CHANGELOG.md Signed-off-by: James Addison --------- Signed-off-by: James Addison Signed-off-by: roma2023 --- CHANGELOG.md | 2 +- utils/license_headers.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e3ea1f1b..31c9a5a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Changed ### Deprecated ### Removed -- Removed unnecessary `# -*- coding: utf-8 -*-` headers from .py files ([#615](https://github.com/opensearch-project/opensearch-py/pull/615)) +- Removed unnecessary `# -*- coding: utf-8 -*-` headers from .py files ([#615](https://github.com/opensearch-project/opensearch-py/pull/615), [#617](https://github.com/opensearch-project/opensearch-py/pull/617)) ### Fixed ### Security diff --git a/utils/license_headers.py b/utils/license_headers.py index 903f176d..575e9868 100644 --- a/utils/license_headers.py +++ b/utils/license_headers.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-License-Identifier: Apache-2.0 # # The OpenSearch Contributors require contributions made to @@ -18,7 +17,7 @@ import sys from typing import Iterator, List -LINES_TO_KEEP = ["# -*- coding: utf-8 -*-", "#!/usr/bin/env python"] +LINES_TO_KEEP = ["#!/usr/bin/env python"] LICENSE_HEADER = """ # SPDX-License-Identifier: Apache-2.0