Silk icon indicating copy to clipboard operation
Silk copied to clipboard

Code formatting

Open PrzemoF opened this issue 8 years ago • 6 comments

Please consider using python code auto formatting tools, like autopep8 [1]. [1] https://pypi.python.org/pypi/autopep8

PrzemoF avatar Aug 20 '17 20:08 PrzemoF

that looks really convenient....but time spent learning new tools is time not spent making new functionality. i have to walk a fine line. i'll definitely look into it, but no promises as far as implementation :)

edwardvmills avatar Aug 20 '17 23:08 edwardvmills

I call it "sharpening the tools" :-) If it looks interesting I'll prepare a demo fork and you'll be able to pull the changes easily.

PEP8 uses spaces instead of tabs - is it OK for you?

P.S. All it takes is (on linux): find . -name "*.py" | xarg -I [] autopep8 -i [] which means: find all python files in the project directory and call autopep8-in-place for every single one.

PrzemoF avatar Aug 21 '17 07:08 PrzemoF

is it available on windows? i use Notepad++ and i was hoping to see an option to do that. i'm concerned about relying on tools i don't have easy access to.

edwardvmills avatar Aug 21 '17 08:08 edwardvmills

Looks like it is, but I don't use windows for writing code (vim+syntastic+pathogen+autopep8 is my setup and it all happens in the background after a proper setup) Take a look here for notepad++ "plugin" : https://gist.github.com/kmonsoor/11374912

PrzemoF avatar Aug 21 '17 09:08 PrzemoF

@edwardvmills i think this is a good idea. It makes reading code easier if you want others to collaborate, IMHO.
ref: https://github.com/edwardvmills/Silk/pull/6

luzpaz avatar Mar 25 '18 00:03 luzpaz

PR to add LGTM badges #15

luzpaz avatar Mar 16 '20 13:03 luzpaz