diff --git a/ci_scripts/check_versions.py b/ci_scripts/check_versions.py index f67cf8c6..8b883b1a 100755 --- a/ci_scripts/check_versions.py +++ b/ci_scripts/check_versions.py @@ -206,8 +206,13 @@ def create_deprecation_pr(package: str, reason: str) -> Optional[str]: deprecated_file = Path("ci_scripts/deprecated.txt") lines = deprecated_file.read_text().splitlines() - comments = lines[:7] - deprecated_packages = lines[7:] + i = next( + i for i, line in enumerate(lines) + if line.strip() and not line.lstrip().startswith("#") + ) + + comments = lines[:i] + deprecated_packages = lines[i:] if package not in deprecated_packages: deprecated_packages.append(package) diff --git a/ci_scripts/deprecated.txt b/ci_scripts/deprecated.txt index 9ed5e988..61a0e9b2 100644 --- a/ci_scripts/deprecated.txt +++ b/ci_scripts/deprecated.txt @@ -4,9 +4,9 @@ # SPDX-License-Identifier: Apache-2.0 # List of deprecated packages. Deprecated packages are those which are now built -for riscv64 platforms by the upstream projects, so we don't need to maintain a -build workflow for it ourselves. Previously-built wheels should remain in the -RISE package registry. +# for riscv64 platforms by the upstream projects, so we don't need to maintain a +# build workflow for it ourselves. Previously-built wheels should remain in the +# RISE package registry. aiohttp blake3