You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Incorrect data type definition for attributes without annotation #110
Please note that the qux attribute also inherited the data type from the previous one
Expected behavior
I think it is obvious that the data type should not be inherited from the previous attribute.
I also think that for attributes like */** the default data type can be tuple and dict, respectively.
System (please complete the following information):
Thanks for the report! It looks like Griffe is correctly collecting data, so I suspect the issue happens in the Python handler where loop variable isn't reset. I'll fix this ASAP 🙂
I also think that for attributes like /* the default data type can be tuple and dict, respectively.
Not really. *args and **kwargs are tuples and dicts respectively, sure, but tools expect to find their inner element type as annotation: *args: float or **kwargs: set[int]. It means we can't compute a default type annotation, and it will stay empty if the user didn't provide one.
Activity
pawamoy commentedon Sep 25, 2023
Thanks for the report! It looks like Griffe is correctly collecting data, so I suspect the issue happens in the Python handler where loop variable isn't reset. I'll fix this ASAP 🙂
pawamoy commentedon Sep 25, 2023
Not really.
*argsand**kwargsare tuples and dicts respectively, sure, but tools expect to find their inner element type as annotation:*args: floator**kwargs: set[int]. It means we can't compute a default type annotation, and it will stay empty if the user didn't provide one.waylan commentedon Sep 27, 2023
I have seen this behavior as well. Looking forward to a fix.
fix: Stop propagation of annotation to next parameter in signature te…
fix: Stop propagation of annotation to next parameter in signature te…