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

feat: add subclasses to children and reference #77

Merged
merged 4 commits into from
Jul 26, 2021
Merged

Conversation

dandhlee
Copy link
Collaborator

@dandhlee dandhlee commented Jul 24, 2021

Before you open a pull request, note that this repository is forked from here.
Unless the issue you're trying to solve is unique to this specific repository,
please file an issue and/or send changes upstream to the original as well.


The function insert_children_on_class only cared about underlying class methods, attributes and properties, which left out subclasses of a class.

To make that happen, search for the parent class by using datam['module'] and see if there is a parent class that exists, then check that both types are class so we don't accidentally insert anything else when we retrieve classes from app.env.docfx_yaml_classes.get(datam[MODULE]).

When actually inserting the children, we separate whether it's class items we're looking for such as attributes, properties and methods, or if it is a subclass of a class with the nested if condition.

template update to this corresponding PR: googleapis/doc-templates#238

Fixes internally filed issue.

It's a good idea to open an issue first for discussion.

  • Tests pass
  • Appropriate changes to README are included in PR

@dandhlee dandhlee requested review from tbpg and a team July 24, 2021 20:00
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Jul 24, 2021
@dandhlee
Copy link
Collaborator Author

Adding this as part of unittest is a bit hard to do because of app.env.docfx_yaml_classes, I'll handle the test case as part of testing with goldens in #44.

@dandhlee dandhlee merged commit 0cab5f6 into master Jul 26, 2021
@dandhlee dandhlee deleted the retrieve_children branch July 26, 2021 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants