Fix PEP 8: unexpected spaces around keyword / parameter equals
Remove whitespaces around '(' and ')' according to PEP 8
Make lint happy on assertions
Remove whitespaces around '[' and ']' according to PEP 8