Coder Social home page Coder Social logo

Comments (3)

tristanlatr avatar tristanlatr commented on July 25, 2024

I’m working on adding better support for attrs API (#656). See the result here . Basically it auto generates the documentation for the init method, which contain default values in the signature.

Once this merged, I’ll adjust the code so that it will work for dataclasses and named tuples, as well as for pydantic models. Since all of this provides more or less the same thing (from a documentation perspective).

For the short term, we could improve the way the system choose to display the value of an attribute so that it can be customized by subclassing the System class. This means replacing the static System.show_attr_value class attribute into a function System.showAttributeValue. Which could be customized on your end afterwards.

tell me what you think.

from pydoctor.

jgarbers avatar jgarbers commented on July 25, 2024

Thanks so much for the quick reply! It'll take me some study to get a solid grasp of what you're proposing but I have high confidence that it'll be just fine. I still owe you a reproducer on issue #728 but recreating that situation is trickier than I thought... hopefully soon!

from pydoctor.

tristanlatr avatar tristanlatr commented on July 25, 2024

This is the place that needs change for the short term: https://github.com/twisted/pydoctor/blob/662eafaedcdfcfa0c5a83c1048c28f187fbcf4c9/pydoctor/templatewriter/pages/attributechild.py#L81C5-L81C5

from pydoctor.

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.