Code Monkey home page Code Monkey logo

Comments (6)

davidhalter avatar davidhalter commented on July 20, 2024

I try to improve the docstrings, they are really bad in some places. Sphinx... Not now. I had it running once, but if the docstrings are not good enough, it doesn't make sense. But later on.

from jedi.

davidhalter avatar davidhalter commented on July 20, 2024

Is this enough? Please tell me if you don't understand the api. Sphinx is not going to come for quite some time (if ever). At the earliest I'll expect it in January.

from jedi.

tkf avatar tkf commented on July 20, 2024

Thanks, that is useful. (Especially "don't use" lines.)

In the future, I think it would be great to have executable examples (i.e., doctests), like this:

>>> import os
>>> source = """\
... import json
... json.l"""
>>> script = Script(source, 2, 6, os.devnull)
>>> script
<jedi.api.Script at 0x7f6d40f3db90>
>>> completions = script.complete()
>>> completions
[<Completion: load>, <Completion: loads>]
>>> completions[0].complete
'oads'
>>> completions[0].word
'loads'

from jedi.

davidhalter avatar davidhalter commented on July 20, 2024

What do you think: Do they belong into the header doctests or everywhere? (Because really everything depends on each other)

from jedi.

tkf avatar tkf commented on July 20, 2024

I agree that's difficult part. I would put the above test in Completion class docstring.

from jedi.

davidhalter avatar davidhalter commented on July 20, 2024

https://jedi.readthedocs.org/en/latest/

This should fix it.

from jedi.

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.