spadarian / docblock-python

Atom plugin to insert documentation blocks for python functions
GNU General Public License v2.0
22 stars 9 forks source link

get tabs from the overall pyton indentation config. #35

Closed SKalt closed 5 years ago

SKalt commented 5 years ago

Also, some functional programming: elimated needless this, split reused functions into ./lib/utils.js.

My tests are currently failing locally, so I'm using an early PR to see if Travis does anything differently.
EDIT: Still failing, with unexpected token 'export'. I'll get back to this in a bit. If anyone wants to get tests in the meantime, fork my branch and I'll rebase on yours.

spadarian commented 5 years ago

What about splitting this PR into:

SKalt commented 5 years ago

Hey @spadarian, the functional programming issue is enough of a blocker for updating how indents are made that I'm not sure I can extricate the two. I tend to rely on the jump-to-definition+type hinting provided by atom-ide-ui and ide-typescript for JS development. Since those tools can't follow statements like this.options or this.someFunction(/*...*/) to the definition of those values, I'm getting bogged down.

SKalt commented 5 years ago

I'm going to put work on this on the back burner, but in case you want to view/continue my functional-programming WIP, it's at https://github.com/SKalt/docblock-python/tree/complete-functional-refactor

spadarian commented 5 years ago

Fair enough. I will try to view/continue your refactoring after submitting my PhD thesis.

Do your last changes close #32 ? If so, I will try to merge this PR after checking why the checks are failing.

SKalt commented 5 years ago

I will try to view/continue your refactoring after submitting my PhD thesis.

Fair enough. Good luck (and thanks for the reply during crunch time)!

Do your last changes close #32 ?

Nope. I haven't yet figured out how to combine indentation, tab, and the var/property of options that I added: tab_length. Better documentation of options and possibly a port to typescript would help me understand the information each function is consuming/outputting.

spadarian commented 5 years ago

I managed to parametrize the tab length so I closed this PR.

I still have to refactor the code following https://github.com/spadarian/docblock-python/pull/35#issuecomment-486793401

I also need to document the code better, including options (ironic for a package that encourages documenting).

spadarian commented 4 years ago

Hey @SKalt I've been working on your refactoring here: https://github.com/spadarian/docblock-python/tree/complete-functional-refactor

I'm aiming to make a v1.0 release at some point and I would like to have the code as organised as possible (I also need to document most functions). The code passes all the tests at the moment. Do you mind having a quick look? I would really appreciate your suggestions!

Cheers!

SKalt commented 4 years ago

I'd be happy to leave comments if you open a PR! Initial thoughts: