This change prevents fixers from changing the tree unnecessarily, which results in no visible diff and the file still being reported as needing modifications (as described in bpo-41110).
This partially addresses an issue in python-modernize where a non-zero exit code is returned even when no changes to files need to be made: python-modernize/python-modernize#161
Description
This change prevents fixers from changing the tree unnecessarily, which results in no visible diff and the file still being reported as needing modifications (as described in bpo-41110).
This partially addresses an issue in python-modernize where a non-zero exit code is returned even when no changes to files need to be made: python-modernize/python-modernize#161
This exists as a pull request to cpython as well: https://github.com/python/cpython/pull/21296