Coder Social home page Coder Social logo

Multiple inheritance about custom_inherit HOT 5 CLOSED

rsokl avatar rsokl commented on June 14, 2024
Multiple inheritance

from custom_inherit.

Comments (5)

rsokl avatar rsokl commented on June 14, 2024

Sorry about the delay on this. I believe the Notes section needs to be removed from the multi-merge-able sections introduced in #31. Furthermore, we need to add testing / documentation for the expected behavior with multiple inheritance.

from custom_inherit.

ickc avatar ickc commented on June 14, 2024

I think I'm seeing the same bug. My example is a little different using v2.3.2:

from dataclasses import dataclass

from custom_inherit import DocInheritMeta


@dataclass
class A(metaclass=DocInheritMeta(style='numpy_napoleon_with_merge')):
    """Testing A.

    Parameters
    ----------
    a :
        parameter a.
    b :
        parameter b.
    c :
        parameter c.

    Returns
    -------

    """
    a: str = 'a'
    b: str = 'b'
    c: str = 'c'


@dataclass
class B(A):
    """Testing B.

    Parameters
    ----------
    d :
        parameter d.
    e :
        parameter e.
    f :
        parameter f.

    Returns
    -------

    """
    d: str = 'd'
    e: str = 'e'
    f: str = 'f'


@dataclass
class C(B):
    """Testing C.

    Parameters
    ----------
    g :
        parameter g.
    h :
        parameter h.
    i :
        parameter i.

    Returns
    -------

    """
    g: str = 'g'
    h: str = 'h'
    i: str = 'i'

Run this with python -c 'from testing import C; print(C.__doc__)' shows

Testing C.

Parameters
----------
a :
    parameter a.
b :
    parameter b.
c :
    parameter c.
a :
    parameter a.
b :
    parameter b.
c :
    parameter c.
d :
    parameter d.
e :
    parameter e.
f :
    parameter f.
g :
    parameter g.
h :
    parameter h.
i :
    parameter i.

Returns
-------

where the a, b, c from the parent repeated.

from custom_inherit.

rsokl avatar rsokl commented on June 14, 2024

This was not quite resolved. But will be imminently

from custom_inherit.

rsokl avatar rsokl commented on June 14, 2024

@ickc @abeelen this has been fixed in v2.4.0 which is now available on pypi (and will be available on conda-forge within the next couple of days).

Apologies for these issues and for the slow response.

from custom_inherit.

ickc avatar ickc commented on June 14, 2024

No problem at all and thanks for the updates. I'll test it soon and if there's further problem I'll let you know.

from custom_inherit.

Related Issues (18)

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.