fix(check): SPDX license string; E501 off in tests (device-types pilot)
The pilot's build warned that setuptools refuses a license table and License classifiers from 2027-02-18 (PEP 639); check now reports both and the template builds with setuptools>=77. Recorded device output in tests keeps its lines, so the template turns E501 off under tests/.
This commit is contained in:
1 parent
db6b2e4ea7
commit
0b21f62553
7 files changed
+45
-8
No files matched your search
@@ -77,6 +77,11 @@ def _metadata(repo: Repo) -> Iterator[Finding]:
|
||||
for field in REQUIRED_FIELDS:
|
||||
if not repo.project.get(field):
|
||||
yield Finding("metadata", f"[project] has no {field}")
|
||||
# PEP 639: setuptools refuses the table form and license classifiers from 2027-02-18.
|
||||
if isinstance(repo.project.get("license"), dict):
|
||||
yield Finding("metadata", 'license must be an SPDX string: license = "Apache-2.0"')
|
||||
if any(c.startswith("License ::") for c in repo.project.get("classifiers", [])):
|
||||
yield Finding("metadata", "drop the License :: classifier; the SPDX license says it")
|
||||
|
||||
|
||||
def _python(repo: Repo) -> Iterator[Finding]:
|
||||
|
||||
Reference in new issue
Block a user