Skip to content

Commit 0837c5b

Browse files
authored
Remove unnecessary utf-8 header in license_headers.py (follow-up to opensearch-project#615) (opensearch-project#617)
* License tools: remove utf-8 coding declaration from license_headers.py check/fix script; since opensearch-project#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 <james@reciperadar.com> * Cleanup: remove utf-8 coding declaration from the license_headers.py script itself Signed-off-by: James Addison <james@reciperadar.com> * Update CHANGELOG.md Signed-off-by: James Addison <james@reciperadar.com> --------- Signed-off-by: James Addison <james@reciperadar.com>
1 parent 6f26eb3 commit 0837c5b

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
1010
### Changed
1111
### Deprecated
1212
### Removed
13-
- Removed unnecessary `# -*- coding: utf-8 -*-` headers from .py files ([#615](https://github.com/opensearch-project/opensearch-py/pull/615))
13+
- 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))
1414
### Fixed
1515
### Security
1616

utils/license_headers.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
# SPDX-License-Identifier: Apache-2.0
32
#
43
# The OpenSearch Contributors require contributions made to
@@ -18,7 +17,7 @@
1817
import sys
1918
from typing import Iterator, List
2019

21-
LINES_TO_KEEP = ["# -*- coding: utf-8 -*-", "#!/usr/bin/env python"]
20+
LINES_TO_KEEP = ["#!/usr/bin/env python"]
2221

2322
LICENSE_HEADER = """
2423
# SPDX-License-Identifier: Apache-2.0

0 commit comments

Comments
 (0)