Open realh opened 5 years ago
Does PR #29 fix that issue?
Yes, but only partially, because it doesn't support fields. I'm not sure how best to deal with them. If output classes had a constructor that set those fields with type annotations, would jedi etc be able to introspect them?
Probably it won't. It's not possible to assign a docstring to class attribute, here's an explanation: https://stackoverflow.com/questions/3051241/how-to-document-class-attributes-in-python .
A possible work-around would be adding an empty property for each field:
class Foo:
@property
def field_name(self):
"""Docstring for field_name"""
pass
That sounds like a good idea. Shall I give it a try and open a new PR?
fakegir seems to miss out "record" items, which is what gi calls structs. structs may have methods. They're quite important in some libraries, so fakegir not supporting them is a big hindrance.