-
Assume I have the following codemod: from __future__ import annotations
import libcst as cst
from libcst.codemod import VisitorBasedCodemodCommand
from libcst.metadata import TypeInferenceProvider
class RenameMethodCallCommand(VisitorBasedCodemodCommand):
METADATA_DEPENDENCIES = (TypeInferenceProvider,)
def visit_Call(self, node: cst.Call) -> bool | None:
scope = self.get_metadata(TypeInferenceProvider, node) When using the My question is: how can I add the cache so |
Beta Was this translation helpful? Give feedback.
Answered by
Kludex
Jun 16, 2023
Replies: 1 comment
-
I'm just copying this: |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Kludex
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm just copying this:
LibCST/libcst/metadata/tests/test_name_provider.py
Line 21 in a3f5bf9