From 2cc42f78929ba1815853be181d3b16da7c05f811 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C5=81ukasz=20Langa?= Date: Sat, 9 Jun 2018 19:49:20 -0700 Subject: [PATCH 1/1] Don't mark subtrees as changed that were already marked. --- blib2to3/pytree.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/blib2to3/pytree.py b/blib2to3/pytree.py index b24866e..61df2b6 100644 --- a/blib2to3/pytree.py +++ b/blib2to3/pytree.py @@ -132,6 +132,8 @@ class Base(object): return node.lineno def changed(self): + if self.was_changed: + return if self.parent: self.parent.changed() self.was_changed = True -- 2.39.5