PyCharm: Turn on Python 3 Code Checking in a Python 2 Project
I have a big Python 2 project that I want to port to Python 3. As per the porting guide I want to become Python 2/3 compatible first. This would mean writing Python 3 compatible code in Python 2. Is there a way to tell PyCharm to turn on Python 3 code checking in a Python 2 project?
Solution 1:
I use the Python Community Edition extension in IDEA, currently version 5.1.145.45. Open Settings. Under Editor -> Inspections find the section in the center pane for "Python" there is now a setting for "Code compatibility inspection" where you can choose the python versions to inspect.
I haven't looked lately but the PyCharm settings should be identical.