Skip to content

Commit 134e587

Browse files
committed
Suppress nitpicky typecheck in pyright.
1 parent 0bf2663 commit 134e587

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

setuptools/tests/test_wheel.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,10 @@ def _check_wheel_install(
160160

161161
(dist,) = metadata.Distribution.discover(path=[egg_path])
162162

163-
assert dist.metadata['Name'] == project_name
164-
assert dist.metadata['Version'] == version
163+
# pyright is nitpicky; fine to assume dist.metadata.__getitem__ will fail or return None
164+
# (https://github.com/pypa/setuptools/pull/5006#issuecomment-2894774288)
165+
assert dist.metadata['Name'] == project_name # pyright: ignore # noqa: PGH003
166+
assert dist.metadata['Version'] == version # pyright: ignore # noqa: PGH003
165167
assert dist.read_text('requires.txt') == requires_txt
166168

167169

0 commit comments

Comments
 (0)