diff --git a/test/openjd/test_copyright_header.py b/test/openjd/test_copyright_header.py index 18d6b359..e4c20ca8 100644 --- a/test/openjd/test_copyright_header.py +++ b/test/openjd/test_copyright_header.py @@ -7,7 +7,6 @@ _copyright_header_re = re.compile( r"Copyright Amazon\.com, Inc\. or its affiliates\. All Rights Reserved\.", re.IGNORECASE ) -_generated_by_scm = re.compile(r"# file generated by setuptools[_-]scm", re.IGNORECASE) def _check_file(filename: Path) -> None: @@ -31,17 +30,7 @@ def _check_file(filename: Path) -> None: def _is_version_file(filename: Path) -> bool: - if filename.name != "_version.py": - return False - with open(filename) as infile: - lines_read = 0 - for line in infile: - if _generated_by_scm.search(line): - return True - lines_read += 1 - if lines_read > 10: - break - return False + return filename.name == "_version.py" def test_copyright_headers():