fix: ship py.typed so type checkers read the package's types
The package declares "Typing :: Typed" but shipped no PEP 561 marker, so mypy in driver repositories treated it as untyped. Add the marker, include it as package data, and release 4.7.1.
This commit is contained in:
1 parent
155b5bbbe4
commit
7afa590c0c
3 files changed
+13
-1
No files matched your search
Whitespace-only changes.
+4
-1
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "napalm-device-types"
|
||||
version = "4.7.0"
|
||||
version = "4.7.1"
|
||||
description = "Abstract device-type base classes for NAPALM drivers"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.10"
|
||||
@@ -61,6 +61,9 @@ dev = [
|
||||
where = ["."]
|
||||
include = ["napalm_device_types*"]
|
||||
|
||||
[tool.setuptools.package-data]
|
||||
napalm_device_types = ["py.typed"]
|
||||
|
||||
[tool.mypy]
|
||||
python_version = "3.10"
|
||||
strict = true
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
"""The package says it is typed (PEP 561), so it must ship the marker."""
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
import napalm_device_types
|
||||
|
||||
|
||||
def test_the_package_ships_py_typed():
|
||||
assert (Path(napalm_device_types.__file__).parent / "py.typed").is_file()
|
||||
Reference in new issue
Block a user