diff --git a/pybind11_stubgen/parser/mixins/parse.py b/pybind11_stubgen/parser/mixins/parse.py index 66308f1..d9522fa 100644 --- a/pybind11_stubgen/parser/mixins/parse.py +++ b/pybind11_stubgen/parser/mixins/parse.py @@ -77,7 +77,8 @@ def _iter_class_members(self, class_: type): # Iterate __dict__ keys for definition order, but resolve values # through getattr() so descriptors (staticmethod, properties, etc.) # are properly unwrapped — matching inspect.getmembers() semantics. - for name in class_.__dict__: + names = list(class_.__dict__); + for name in names: seen.add(name) try: value = getattr(class_, name)