Git Product home page Git Product logo

Comments (2)

Chilipp avatar Chilipp commented on July 26, 2024

Hello @maeddlae, thanks for submitting this issue! autodocsumm uses the flags provided to autodoc. Hence, it generates an entry in the table for each attribute that is documented by autodoc.

By default, autodoc does not document inherited members. Therefore, if you want to include them, you have to include the :inherited-members: flag for the corresponding directive (see the autodoc docs)

To be safe, I added tests for it for autodocsumm in 23c30e4 and the inheritance is working.

The objective of autodocsumm is to create a table for the attributes that are documented in detail by autodoc. Do you think it would be helpful to allow the documentation of more than that?

from autodocsumm.

maeddlae avatar maeddlae commented on July 26, 2024

My bad, you are right. I just forgot to redefine the base class attribute in sub class in order to make it appear. This code is now summarized as it should (except of #8):

class Example():
    """
    class documentation
    """
    class_variable = 12 #: This is a classvariable
    
    def __init__(self):
        """
        constructor doc
        """
        self.instance_variable = 34 #: This is an instance variable
        
class Inherits(Example):
    """
    class documentation
    """
    another_class_variable = 12 #: This is another classvariable
    class_variable = Example.class_variable #: This is a classvariable from base class
    
    def __init__(self):
        """
        constructor doc
        """
        self.another_instance_variable = 34 #: This is another instance variable
        self.instance_variable = self.instance_variable #: This is an instance variable from base class

image

from autodocsumm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.