Skip to content

Commit 0538443

Browse files
authored
fix: use proper SPDX license identifier in pyproject.toml and add correct copyright comments to package source and tests (#1109)
1 parent 260075b commit 0538443

9 files changed

Lines changed: 24 additions & 3 deletions

File tree

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 1999–2023
3+
Copyright (c) 1999–2026 CODEOWNERS
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
66

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ requires-python = ">=3.10.0,<3.14.0"
1010
authors = [{name = "Author", email = "author@email"}]
1111
maintainers = [{name = "Maintainer", email = "maintainer@email"}]
1212
dynamic = ["version", "description"]
13-
license = {file = "LICENSE.md"}
13+
license = "MIT" # https://spdx.org/licenses/MIT.html
14+
license-files = ["LICENSE.md"]
1415
readme = "README.md"
1516
dependencies = []
1617
keywords = []
1718
# https://pypi.org/classifiers/
1819
classifiers = [
1920
"Development Status :: 1 - Planning",
2021
"Intended Audience :: Developers",
21-
"License :: OSI Approved :: MIT License",
2222
"Natural Language :: English",
2323
"Operating System :: OS Independent",
2424
"Programming Language :: Python",

src/package/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
This package is an empty cookiecutter package example. Enjoy!
44
"""
55

6+
# Copyright (c) 2021-2026 CODEOWNERS
7+
# This code is licensed under MIT license, see LICENSE.md for details.
8+
69
# The version of this package. There's no comprehensive, official list of other
710
# magic constants, so we stick with this one only for now. See also this conversation:
811
# https://stackoverflow.com/questions/38344848/is-there-a-comprehensive-table-of-pythons-magic-constants

src/package/__main__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
"""The main entry point into this package when run as a script."""
22

3+
# Copyright (c) 2021-2026 CODEOWNERS
4+
# This code is licensed under MIT license, see LICENSE.md for details.
5+
36
# For more details, see also
47
# https://docs.python.org/3/library/runpy.html
58
# https://docs.python.org/3/reference/import.html#special-considerations-for-main

src/package/something.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
"""The Something module provides some things and functions."""
22

3+
# Copyright (c) 2021-2026 CODEOWNERS
4+
# This code is licensed under MIT license, see LICENSE.md for details.
5+
36

47
class Something:
58
"""The Something class provides some things."""

tests/integration/test_something.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
"""Test the Package itself using its external interface as in integration into a larger run context."""
22

3+
# Copyright (c) 2021-2026 CODEOWNERS
4+
# This code is licensed under MIT license, see LICENSE.md for details.
5+
36
# https://bandit.readthedocs.io/en/latest/blacklists/blacklist_imports.html#b404-import-subprocess
47
import subprocess # nosec B404
58

tests/performance/test_something.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
"""Test the performance of various package parts, or the package as a whole."""
22

3+
# Copyright (c) 2021-2026 CODEOWNERS
4+
# This code is licensed under MIT license, see LICENSE.md for details.
5+
36
import pytest
47
from pytest_benchmark.fixture import BenchmarkFixture
58

tests/unit/conftest.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
"""Test configuration and other goodness."""
22

3+
# Copyright (c) 2021-2026 CODEOWNERS
4+
# This code is licensed under MIT license, see LICENSE.md for details.
5+
36
import os
47

58
import hypothesis

tests/unit/test_something.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
"""Test the Something module as a unit test. Add more tests here, as needed."""
22

3+
# Copyright (c) 2021-2026 CODEOWNERS
4+
# This code is licensed under MIT license, see LICENSE.md for details.
5+
36
import faker
47
from hypothesis import given, strategies
58
from pytest_cases import parametrize_with_cases

0 commit comments

Comments
 (0)