diff --git a/.github/workflows/check-style-strict.yml b/.github/workflows/check-style-strict.yml index 4fd4252b..c5fe1878 100644 --- a/.github/workflows/check-style-strict.yml +++ b/.github/workflows/check-style-strict.yml @@ -14,6 +14,5 @@ jobs: cache: 'pip' cache-dependency-path: '.github/workflows/style-requirements.txt' - run: python -m pip install -r .github/workflows/style-requirements.txt - - run: | - # Report on out-of-date copyright years. - python -m flake8 --select H102 . + - name: Report on out-of-date copyright end years + run: python -m flake8 --select H102 --copyright-end-year current . diff --git a/.github/workflows/style-requirements.txt b/.github/workflows/style-requirements.txt index 1bdb38a4..692dec85 100644 --- a/.github/workflows/style-requirements.txt +++ b/.github/workflows/style-requirements.txt @@ -1,2 +1,2 @@ flake8 -flake8-ets +flake8-ets >= 1.1.0 diff --git a/etstool.py b/etstool.py index 2d851073..98ab48f2 100644 --- a/etstool.py +++ b/etstool.py @@ -94,11 +94,6 @@ #: Default Python version to use. DEFAULT_RUNTIME = "3.8" -#: Copyright end year expected by the merge-blocking style check. We hard-code -#: this (rather than using the current year) to give us a buffer on CI failures -#: when January 1st rolls around. -EXPECTED_COPYRIGHT_END_YEAR = 2026 - def edm_dependencies(runtime): """ @@ -318,7 +313,6 @@ def flake8(edm, runtime, environment): ] commands = [ "{edm} run -e {environment} -- python -m flake8 " - f"--copyright-end-year {EXPECTED_COPYRIGHT_END_YEAR} " + " ".join(targets) ] execute(commands, parameters) diff --git a/setup.cfg b/setup.cfg index c0076014..1e7a2a99 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,7 @@ [flake8] ignore = E266, W503 +# Pin the year so style checks don't fail when the year rolls over. +copyright-end-year = 2026 per-file-ignores = */api.py:F401, */__init__.py:F401,