Giter Site home page Giter Site logo

Comments (3)

jshwi avatar jshwi commented on May 29, 2024 1

Hello @EFord36

Thanks for taking the time to write this up, happy to hear you have found this useful

I went for the current format as this is how I like to write my class docstrings. I did consider the case you're making, but class checks were optional so I let it be. I can't remember what documentation or advice I followed for this to be my preferred way of writing class docstrings, but I can't argue with the PEP as I generally follow PEPs to reduce complexity in my workflow.

I would be interested in docsig supporting this. I would like this to benefit as many people as possible so if this is something anyone else would want, in this case yourself, then that would be reason enough to add it in my opinion.

I would like to keep the way classes are currently checked as an option, as myself and others (flask being an example) document classes this way as a preference

Please open a PR, that would be great! It could be as simple as creating a new flag, -C, --check-class-constructor and then implementing what you've suggested by passing the flag to the end logic. Personally I would prefer if this can work independent of the previous way. Although it wouldn't make much sense to pass -c and -C at the same time it doesn't really have to be an either or, and it could just be up to the end user to choose which switch they like. Adding string literal options to argparse can be a bit of a mess (e.g. docsig --check-class class or docsig --check-class constructor is probably not ideal, in my opinion, as it comes with the need to set defaults and just leads to more typing).

I look forward to seeing how things work out

Cheers!
Stephen

from docsig.

EFord36 avatar EFord36 commented on May 29, 2024 1

Makes sense! Yes, totally makes sense that the flag is cleanest - I meant to mention that as an option as well, sorry for forgetting.

Hopefully I'll be able to get to this sometime next week!

from docsig.

EFord36 avatar EFord36 commented on May 29, 2024

quick update - mainly for the purpose of saying 'I am working on this, it shouldn't be too long:

I've start working on this and think I'm nearly there implementation wise, but need to add tests (and to do that, figure out how to add tests that specify the options to docsig). Shouldn't take long, but I've been a bit tied up this week. Hopefully not too long until I can make some more progress.

from docsig.

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.