From 8267d0913aa920321f656ee21462ff3cd4660515 Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Fri, 20 Aug 2021 09:30:50 +0200 Subject: astroid.context: import object one by one instead of the entire module --- astroid/transforms.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'astroid/transforms.py') diff --git a/astroid/transforms.py b/astroid/transforms.py index bc4486b5..42d06160 100644 --- a/astroid/transforms.py +++ b/astroid/transforms.py @@ -13,7 +13,7 @@ import collections from functools import lru_cache -from astroid import context as contextmod +from astroid.context import _invalidate_cache class TransformVisitor: @@ -47,7 +47,7 @@ class TransformVisitor: # if the transformation function returns something, it's # expected to be a replacement for the node if ret is not None: - contextmod._invalidate_cache() + _invalidate_cache() node = ret if ret.__class__ != cls: # Can no longer apply the rest of the transforms. -- cgit v1.2.1