Can PyCharm suggest ReSharper-like code improvements, per Hitchhiker's Guide

I'm used to using ReSharper with C# and getting helpful suggested improvements on various language constructs.

I'm now starting with Python using PyCharm.

My question is, can PyCharm be configured to make suggestions as per the "Bad" / "Good" examples in the Hitchhiker's Guide?

An example would be could PyCharm be configured to tell me to change the following "Bad" code to the following "Good" code?

 

Bad:

f = open('file.txt')
a = f.read()
print a
f.close()

Good:

with open('file.txt') as f:
    for line in f:
        print line

Please sign in to leave a comment.