pidora icon indicating copy to clipboard operation
pidora copied to clipboard

pep8-ize the source

Open pjz opened this issue 10 years ago • 5 comments

Any chance you'd want to run autopep8 (which is pip installable) over the source? Mostly to switch from tabs to spaces and 4-space indents? Makes it difficult to work on for python folk used to PEP8 styled source.

pjz avatar May 23 '14 19:05 pjz

I did it on my fork to make it more easily hackable; take whatever you want from https://github.com/pjz/pidora .

pjz avatar May 28 '14 15:05 pjz

Would you call this the "official" PEP8 style guide? I'm working on version 2.0* of Pidora and would rather build it with these ideals in mind.

* In 2.0, I'm making things more modular by separating the pianobar bits from the Pidora bits so that it can support more services (such as Google Music and Soma.fm).

jacroe avatar Jun 07 '14 08:06 jacroe

Yup, that's PEP 8. Good plan. Tools like the aforementioned autopep8 can help, and your text editor probably has a plugin.

pjz avatar Jun 07 '14 11:06 pjz

(Just realized that I included a footnote marker in my above comment and then didn't add the note. Fixed.)

Oh yeah converting from tabs to spaces in Sublime Text is easy-peas; I just usually work in tabs. I'm working more on getting variable and function names up to snuff.

jacroe avatar Jun 07 '14 22:06 jacroe

Also, in places where you have X == y or X == z or X == a it's more pythonic to just test X in [ y, z, a ].

pjz avatar Jun 07 '14 23:06 pjz