Issue 23798: NameError in the encode fixer (original) (raw)

====================================================================== ERROR: test_all_project_files (lib2to3.tests.test_all_fixers.Test_all)

Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/lib2to3/tests/test_all_fixers.py", line 25, in test_all_project_files self.refactor.refactor_file(filepath) File "/home/serhiy/py/cpython/Lib/lib2to3/refactor.py", line 354, in refactor_file tree = self.refactor_string(input, filename) File "/home/serhiy/py/cpython/Lib/lib2to3/refactor.py", line 386, in refactor_string self.refactor_tree(tree, name) File "/home/serhiy/py/cpython/Lib/lib2to3/refactor.py", line 460, in refactor_tree new = fixer.transform(node, results) File "/home/serhiy/py/cpython/Lib/lib2to3/fixes/fix_encode.py", line 50, in transform if negation: NameError: name 'negation' is not defined


Variable 'negation' is never set.