Giter Site home page Giter Site logo

Feature request: sphinx about pydoclint HOT 6 CLOSED

jsh9 avatar jsh9 commented on May 29, 2024
Feature request: sphinx

from pydoclint.

Comments (6)

jsh9 avatar jsh9 commented on May 29, 2024 1

Thanks!

pydoclint uses docstring-parser to parse Google-style docstrings, and I know it can also parse Sphinx-style docstrings:

docstring_parser>=0.15

The reason I'm asking for a style guide is for me to write test cases. I haven't really used the Sphinx style before.

from pydoclint.

jsh9 avatar jsh9 commented on May 29, 2024 1

Hi @wwuck:

I added support for the Sphinx docstring style. It's in the latest release (v0.1.0).

Please feel free to try it out. Since I'm not very familiar with this style, I don't know what different variations of this style can there be.

If you find any issues or false positives, please feel free to open other issues. Thanks!

from pydoclint.

jsh9 avatar jsh9 commented on May 29, 2024

I procrastinated a bit but this day has eventually come 😂

Yes, this is something that I could add.

Could you confirm that this is the official guide/rules of the Sphinx docstring style? https://sphinx-rtd-tutorial.readthedocs.io/en/latest/docstrings.html

Thanks!

from pydoclint.

wwuck avatar wwuck commented on May 29, 2024

I believe the docs would be at https://www.sphinx-doc.org/, specifically https://www.sphinx-doc.org/en/master/tutorial/describing-code.html#documenting-python-objects.

from pydoclint.

wwuck avatar wwuck commented on May 29, 2024

The darglint2 readme mentions a couple of libraries that claim to parse sphinx docstring format:

https://pypi.org/project/docstring-utils/
https://pypi.org/project/docstring-parser/

from pydoclint.

wwuck avatar wwuck commented on May 29, 2024

I guess the link you found above looks ok for examples. I also found some bnf grammar definitions in darglint repository that may be useful: https://github.com/akaihola/darglint2/tree/master/darglint2/parse/grammars

from pydoclint.

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.