Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enums with methods #86

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

yamoling
Copy link

Hello,

I was lacking the possibility of having methods and properties to enums, so here is a proposal that adds this functionality. Additionally, the documentation of documented members is now also present in the ".pyi" output.

Here is a summary of the few changes:

  • MemberInfo and MemberDef have a doc and a is_property attribute.
  • StubInfoBuilder::add_methods adds member properties for enums (but not for classes, the behaviour remains the same)
  • StubInfoBuilder::add_methods now looks for struct_id in module.enum_ in addition to module.class.

I would really like these changes to make it to a new release, please let me know if additional changes are required to comply with the current code base.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant