Open parentheses should not have any space before or after them.

Anti-pattern

# The space after open is unnecessary
with open( 'file.dat') as f:
    contents = f.read()

Best practice

with open('file.dat') as f:
    contents = f.read()