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:
christianmanivong committed 2026-10-22 19:08:06 +02:00
1 parent db6b2e4ea7
commit 0b21f62553
7 files changed
+45 -8

No files matched your search

+5 -2
View File
@@ -101,7 +101,9 @@ A pull request without tests for what it adds or changes is not merged.
## 5. Clean code
- **Format and lint:** `ruff format` and `ruff check`, line length 100.
- **Format and lint:** `ruff format` and `ruff check` with `E, F, I, UP, B`, line length
100. Only under `tests/` may a line be longer (E501 off there): recorded device output
keeps its lines.
- **Types:** every public function is annotated; `mypy --strict` (§6 for the old code).
- **Small functions:** under 30 lines recommended, 50 at most; cyclomatic
complexity 10 at most. One function does one thing.
@@ -165,7 +167,8 @@ release tags:
someone else gets a descriptive one instead. The `napalm.drivers` entry point
names do not change with the package name.
- **`pyproject.toml`** declares `name`, `version`, `description`, `readme`,
`license = "Apache-2.0"`, `requires-python = ">=3.10"`, the dependencies, a
`license = "Apache-2.0"` (an SPDX string, PEP 639; no table, no `License ::`
classifier, `setuptools>=77`), `requires-python = ">=3.10"`, the dependencies, a
`dev` extra, `[project.urls]` with `Repository` (and `Issues`) on
`https://git.netork.io/NAPALM/…`, and the `napalm.drivers` entry points.
- **Dependencies are ranges with true floors.** A driver is a library: it never pins