freifunk/icvpn-scripts

fix coding style

Closed this issue · 0 comments

booo commented

pep8 is quite unhappy with the current coding style:

(env)➜ icvpn-scripts git:(master) Ⓐ pep8 mkbgp mkdns mksmokeping 
mkbgp:11:1: E302 expected 2 blank lines, found 1
mkbgp:14:7: E111 indentation is not a multiple of four
mkbgp:20:1: E302 expected 2 blank lines, found 1
mkbgp:33:1: E302 expected 2 blank lines, found 1
mkbgp:33:80: E501 line too long (89 > 79 characters)
mkbgp:54:20: E713 test for membership should be 'not in'
mkbgp:59:24: E713 test for membership should be 'not in'
mkbgp:65:29: E128 continuation line under-indented for visual indent
mkbgp:77:9: E128 continuation line under-indented for visual indent
mkbgp:77:80: E501 line too long (128 > 79 characters)
mkbgp:78:9: E128 continuation line under-indented for visual indent
mkbgp:81:9: E128 continuation line under-indented for visual indent
mkbgp:83:9: E128 continuation line under-indented for visual indent
mkbgp:85:9: E128 continuation line under-indented for visual indent
mkbgp:86:9: E128 continuation line under-indented for visual indent
mkbgp:88:9: E128 continuation line under-indented for visual indent
mkbgp:88:80: E501 line too long (86 > 79 characters)
mkbgp:89:9: E128 continuation line under-indented for visual indent
mkbgp:91:9: E128 continuation line under-indented for visual indent
mkbgp:92:9: E128 continuation line under-indented for visual indent
mkbgp:94:9: E128 continuation line under-indented for visual indent
mkbgp:95:9: E128 continuation line under-indented for visual indent
mkbgp:97:9: E128 continuation line under-indented for visual indent
mkbgp:97:80: E501 line too long (100 > 79 characters)
mkbgp:98:9: E128 continuation line under-indented for visual indent
mkbgp:104:13: E128 continuation line under-indented for visual indent
mkbgp:105:13: E128 continuation line under-indented for visual indent
mkdns:10:1: E302 expected 2 blank lines, found 1
mkdns:17:1: E302 expected 2 blank lines, found 1
mkdns:28:1: E302 expected 2 blank lines, found 1
mkdns:40:1: E302 expected 2 blank lines, found 1
mkdns:61:80: E501 line too long (91 > 79 characters)
mkdns:93:9: E128 continuation line under-indented for visual indent
mkdns:93:80: E501 line too long (128 > 79 characters)
mkdns:94:9: E128 continuation line under-indented for visual indent
mkdns:97:9: E128 continuation line under-indented for visual indent
mkdns:98:9: E128 continuation line under-indented for visual indent
mkdns:100:9: E128 continuation line under-indented for visual indent
mkdns:101:9: E128 continuation line under-indented for visual indent
mkdns:103:9: E128 continuation line under-indented for visual indent
mkdns:103:80: E501 line too long (94 > 79 characters)
mkdns:104:9: E128 continuation line under-indented for visual indent
mkdns:108:80: E501 line too long (130 > 79 characters)
mksmokeping:11:1: E302 expected 2 blank lines, found 1
mksmokeping:14:7: E111 indentation is not a multiple of four
mksmokeping:22:34: E231 missing whitespace after ':'
mksmokeping:22:46: E231 missing whitespace after ':'
mksmokeping:25:7: E111 indentation is not a multiple of four
mksmokeping:53:20: E713 test for membership should be 'not in'
mksmokeping:60:62: E231 missing whitespace after ','
mksmokeping:74:9: E128 continuation line under-indented for visual indent
mksmokeping:74:80: E501 line too long (130 > 79 characters)
mksmokeping:75:9: E128 continuation line under-indented for visual indent
mksmokeping:78:9: E128 continuation line under-indented for visual indent
mksmokeping:79:9: E128 continuation line under-indented for visual indent
mksmokeping:81:9: E128 continuation line under-indented for visual indent
mksmokeping:81:80: E501 line too long (86 > 79 characters)
mksmokeping:82:9: E128 continuation line under-indented for visual indent
mksmokeping:86:52: E231 missing whitespace after ','

I suggest we stick with the recommendations from pep8 and use pep8 to lint our code? If nobody disagrees in the next weeks I will clean up the coding style.