Move docstring copyright notices to SPDX header comments - #23
Merged
Conversation
Pull the `Copyright 2026 Matthew C. Digman` line out of each module
docstring and replace it with a two-line SPDX header at the top of the
file:
# SPDX-FileCopyrightText: Copyright 2026 Matthew C. Digman
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
The `Copyright` prefix on the FileCopyrightText value keeps the notice
matching ruff's flake8-copyright (CPY001) default notice-rgx while still
being valid SPDX/REUSE. The license identifier matches the PEP 639
expression in pyproject.toml. The Sphinx `copyright =` config variable in
docs/conf.py is left as-is.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Pull the
Copyright 2026 Matthew C. Digmanline out of each module docstring and replace it with a two-line SPDX header at the top of the file:Applied to the 9 project files that had a copyright notice in their docstring:
tests/test_pyakima.py,docs/conf.py,pyakima/__init__.py,pyakima/pyakima.py, and all fivepyakima/demos/*.py.Why this exact form
Copyrightprefix on theSPDX-FileCopyrightTextvalue means the notice still matches ruff'sflake8-copyright(CPY001) defaultnotice-rgx, which requires the literal wordCopyrightfollowed by whitespace and a year. The bareSPDX-FileCopyrightText: 2026 …form fails that regex.SPDX-FileCopyrightText: Copyright <year> <author>is still valid SPDX/REUSE (the value is free-form text).Apache-2.0 WITH LLVM-exceptiondeclared inpyproject.toml.Left untouched
docs/conf.pycopyright = '2025-2026, Matthew C. Digman'— the Sphinx-mandated config variable (keeps its# noqa: A001), not a docstring notice.__init__.pystubs,_version.py) — nothing to move; they're under ruff'smin-file-size = 1024.Verification
ruff check/ruff format --check— pass (also all pre-commit hooks passed on commit)ruff check --preview --select CPY001— passpy_compileon all changed files — OK🤖 Generated with Claude Code