laktak / extrakto

extrakto for tmux - quickly select, copy/insert/complete text without a mouse
MIT License
878 stars 45 forks source link

Make code pep8 compliant #3

Closed ivanalejandro0 closed 7 years ago

ivanalejandro0 commented 7 years ago

Hey, first of all thanks for creating this plugin :D

I went to look at the code and noticed that it isn't pep8 compliant (which is a nice thing to have on python projects), so I went ahead and made the changes, I hope you don't mind.

I just used an automated tool to fix things for me, it's called autopep8.

# before the fixes
$ pep8 extrakto.py
extrakto.py:3:11: E401 multiple imports on one line
extrakto.py:11:80: E501 line too long (81 > 79 characters)
extrakto.py:15:80: E501 line too long (88 > 79 characters)
extrakto.py:16:80: E501 line too long (89 > 79 characters)
extrakto.py:19:1: E302 expected 2 blank lines, found 1
extrakto.py:20:8: E225 missing whitespace around operator
extrakto.py:22:13: E225 missing whitespace around operator
extrakto.py:23:46: E701 multiple statements on one line (colon)
extrakto.py:23:64: E261 at least two spaces before inline comment
extrakto.py:23:80: E501 line too long (88 > 79 characters)
extrakto.py:26:30: E701 multiple statements on one line (colon)
extrakto.py:29:1: E302 expected 2 blank lines, found 1
extrakto.py:30:8: E225 missing whitespace around operator
extrakto.py:32:13: E225 missing whitespace around operator
extrakto.py:33:26: E701 multiple statements on one line (colon)
extrakto.py:36:1: E302 expected 2 blank lines, found 1
extrakto.py:45:14: E701 multiple statements on one line (colon)
extrakto.py:45:80: E501 line too long (81 > 79 characters)
extrakto.py:46:9: E701 multiple statements on one line (colon)
extrakto.py:56:10: E701 multiple statements on one line (colon)
extrakto.py:62:1: W391 blank line at end of file

# making the fixes
$ autopep8 -i extrakto.py

# after the fixes
$  pep8 extrakto.py
extrakto.py:18:80: E501 line too long (88 > 79 characters)
extrakto.py:19:80: E501 line too long (89 > 79 characters)

There are still 2 minor things to fix there, but I think that this is a good start. Cheers!

laktak commented 7 years ago

Thanks - I'll try to add it to my build step.