Skip to content

Generic ItemsView, KeysView, ValuesView rendered with pybind11-master #209

@auscompgeek

Description

@auscompgeek

Running the tests today results in this unusual output:

diff --git a/tests/stubs/python-3.12/pybind11-master/numpy-array-wrap-with-annotated/demo/_bindings/stl_bind.pyi b/tests/stubs/python-3.12/pybind11-master/numpy-array-wrap-with-annotated/demo/_bindings/stl_bind.pyi
index c39135b..2b9f4d3 100644
--- a/tests/stubs/python-3.12/pybind11-master/numpy-array-wrap-with-annotated/demo/_bindings/stl_bind.pyi
+++ b/tests/stubs/python-3.12/pybind11-master/numpy-array-wrap-with-annotated/demo/_bindings/stl_bind.pyi
@@ -3,12 +3,24 @@ from __future__ import annotations
 import typing
 
 __all__ = [
+    "ItemsView",
+    "KeysView",
     "MapStringComplex",
+    "ValuesView",
     "VectorPairStringDouble",
     "get_complex_map",
     "get_vector_of_pairs",
 ]
 
+class ItemsView:
+    def __iter__(self: typing.ItemsView) -> typing.Iterator: ...
+    def __len__(self: typing.ItemsView) -> int: ...
+
+class KeysView:
+    def __contains__(self: typing.KeysView, arg0: typing.Any) -> bool: ...
+    def __iter__(self: typing.KeysView) -> typing.Iterator: ...
+    def __len__(self: typing.KeysView) -> int: ...
+
 class MapStringComplex:
     def __bool__(self) -> bool:
         """
@@ -28,9 +40,13 @@ class MapStringComplex:
         Return the canonical string representation of this map.
         """
     def __setitem__(self, arg0: str, arg1: complex) -> None: ...
-    def items(self) -> typing.ItemsView[str, complex]: ...
-    def keys(self) -> typing.KeysView[str]: ...
-    def values(self) -> typing.ValuesView[complex]: ...
+    def items(self) -> typing.ItemsView: ...
+    def keys(self) -> typing.KeysView: ...
+    def values(self) -> typing.ValuesView: ...
+
+class ValuesView:
+    def __iter__(self: typing.ValuesView) -> typing.Iterator: ...
+    def __len__(self: typing.ValuesView) -> int: ...
 
 class VectorPairStringDouble:
     __hash__: typing.ClassVar[None] = None

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions