diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-04-24 06:05:00 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-24 06:05:00 (GMT) |
commit | 2e576f5aec1f8f23f07001e2eb3db9276851a4fc (patch) | |
tree | 0c42af143f2ab71bce5865aa72056330fcc510db /Lib/lib2to3/fixes/fix_operator.py | |
parent | 9eb5ca0774f94215be48442100c829db2484e146 (diff) | |
download | cpython-2e576f5aec1f8f23f07001e2eb3db9276851a4fc.zip cpython-2e576f5aec1f8f23f07001e2eb3db9276851a4fc.tar.gz cpython-2e576f5aec1f8f23f07001e2eb3db9276851a4fc.tar.bz2 |
bpo-30144: Import collections ABC from collections.abc rather than collections. (#1263)
Diffstat (limited to 'Lib/lib2to3/fixes/fix_operator.py')
-rw-r--r-- | Lib/lib2to3/fixes/fix_operator.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/lib2to3/fixes/fix_operator.py b/Lib/lib2to3/fixes/fix_operator.py index 1aa17ba..592444e 100644 --- a/Lib/lib2to3/fixes/fix_operator.py +++ b/Lib/lib2to3/fixes/fix_operator.py @@ -9,7 +9,7 @@ operator.repeat(obj, n) -> operator.mul(obj, n) operator.irepeat(obj, n) -> operator.imul(obj, n) """ -import collections +import collections.abc # Local imports from lib2to3 import fixer_base @@ -88,7 +88,7 @@ class FixOperator(fixer_base.BaseFix): def _check_method(self, node, results): method = getattr(self, "_" + results["method"][0].value) - if isinstance(method, collections.Callable): + if isinstance(method, collections.abc.Callable): if "module" in results: return method else: |