diff --git a/pylint/lint.py b/pylint/lint.py index 5a7b3c0529..b84f77f6a0 100644 --- a/pylint/lint.py +++ b/pylint/lint.py @@ -1134,10 +1134,6 @@ def get_ast(self, filepath, modname, data=None): try: if data is None: return MANAGER.ast_from_file(filepath, modname, source=True) - - cached = MANAGER.astroid_cache.get(modname) - if cached and cached.file == filepath: - return cached return AstroidBuilder(MANAGER).string_build(data, modname, filepath) except astroid.AstroidSyntaxError as ex: # pylint: disable=no-member