Priority: P3 (important, not urgent): a typing gap, not a runtime fault.
PackageDict (napalm_device_types/models.py) declares name, version, installed, description, size, source. The Proxmox drivers (and napalm-linux) report three more fields for every installed Debian package, and the application relies on them:
source_package: the Debian source package (openssh-server → openssh), needed for OSV/NVD matching.
source_version: its version, a different number from the binary's (OSV states Debian ranges in source versions).
upgrade_version: the candidate version, "" when none.
Because the contract lacks them, a driver under mypy --strict has to cast its list to list[PackageDict] (napalm-proxmox, host_mixin.get_packages, NAPALM/napalm-proxmox#52), and a reader of the contract cannot tell the fields exist.
Proposal: add the three as NotRequired[str], with the comment on why the source version matters (it is in napalm_proxmox/host_mixin.parse_dpkg_line). Not breaking.
Test-First:
get_type_hints(PackageDict) has the three keys; none is required.
Priority: P3 (important, not urgent): a typing gap, not a runtime fault.
`PackageDict` (`napalm_device_types/models.py`) declares `name, version, installed, description, size, source`. The Proxmox drivers (and napalm-linux) report three more fields for every installed Debian package, and the application relies on them:
- `source_package`: the Debian source package (`openssh-server` → `openssh`), needed for OSV/NVD matching.
- `source_version`: its version, a different number from the binary's (OSV states Debian ranges in source versions).
- `upgrade_version`: the candidate version, `""` when none.
Because the contract lacks them, a driver under `mypy --strict` has to `cast` its list to `list[PackageDict]` (`napalm-proxmox`, `host_mixin.get_packages`, NAPALM/napalm-proxmox#52), and a reader of the contract cannot tell the fields exist.
Proposal: add the three as `NotRequired[str]`, with the comment on why the source version matters (it is in `napalm_proxmox/host_mixin.parse_dpkg_line`). Not breaking.
Test-First:
- [ ] `get_type_hints(PackageDict)` has the three keys; none is required.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Priority: P3 (important, not urgent): a typing gap, not a runtime fault.
PackageDict(napalm_device_types/models.py) declaresname, version, installed, description, size, source. The Proxmox drivers (and napalm-linux) report three more fields for every installed Debian package, and the application relies on them:source_package: the Debian source package (openssh-server→openssh), needed for OSV/NVD matching.source_version: its version, a different number from the binary's (OSV states Debian ranges in source versions).upgrade_version: the candidate version,""when none.Because the contract lacks them, a driver under
mypy --stricthas tocastits list tolist[PackageDict](napalm-proxmox,host_mixin.get_packages, NAPALM/napalm-proxmox#52), and a reader of the contract cannot tell the fields exist.Proposal: add the three as
NotRequired[str], with the comment on why the source version matters (it is innapalm_proxmox/host_mixin.parse_dpkg_line). Not breaking.Test-First:
get_type_hints(PackageDict)has the three keys; none is required.