You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
2to3 reports some files as both not changing and having been modified #85282
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2021-10-20.22:51:55.292>created_at=<Date2020-06-25.04:46:55.584>labels= ['3.8', 'type-bug', 'expert-2to3', '3.9', '3.10']
title='2to3 reports some files as both not changing and having been modified'updated_at=<Date2021-10-20.22:51:55.291>user='https://github.com/AWhetter'
Activity
AWhetter commentedon Jun 25, 2020
Many of the fixers cause the tool to report a file as both unchanged and modified.
For example when checking a file with the following contents:
using the following command:
python -m lib2to3 -f unicode unicode_test.pyThe following is output:
When a fixer returns a node, even if it is the original node without changes, it is considered as a change to the code (
cpython/Lib/lib2to3/refactor.py
Lines 446 to 447 in cf18c9e
The fix appears to be that fixers need to be aware of when they have not made a change and should
Nonewhen that is the case.