flet icon indicating copy to clipboard operation
flet copied to clipboard

Documentation (doc-strings) for IDEs

Open ndonkoHenri opened this issue 3 years ago • 5 comments

I noticed when using Flet on my IdE(pycharm) that there are no doc strings in functions or classes to inform us on the uses of the particular class, examples...etc

These docs are instead in the browser(the controls section)...but we all know it's kind of difficult to move from IDE to browser all the time(especially when we are coding offline😐).

Is it please possible to add these?

ndonkoHenri avatar Sep 21 '22 13:09 ndonkoHenri

Thank you so much for reporting this , yeah it's possible to add.

AdamMusa avatar Sep 22 '22 22:09 AdamMusa

Thanks. It will be very awesome to have this.

ndonkoHenri avatar Sep 22 '22 23:09 ndonkoHenri

Any updates ?

ndonkoHenri avatar Sep 29 '22 18:09 ndonkoHenri

Nope. Would you like to help with that? ;)

FeodorFitsner avatar Sep 29 '22 18:09 FeodorFitsner

I will make researches on the possibilities and add them here.

But, to get started, have a look at Sphinx. You surely have heard of it. It's awesome. Changes made in the code(on parameters, doc-strings..etc) get synced with those on the webpage(generates static HTML which could hosted anywhere) directly. No need to make changes twice.

You guys will have to add Doc-Strings to all your functions and classes(btw this is also a programming good practice), so they could be rendered(take effect) on the webpage. Deploying a Sphinx project online 🙂

Let me know what you think eventually.

ndonkoHenri avatar Sep 30 '22 01:09 ndonkoHenri

https://github.com/flet-dev/flet/pull/681

ndonkoHenri avatar Dec 08 '22 15:12 ndonkoHenri