Skip to content

Commit 392be71

Browse files
authored
Add filtering logic to use-defusedxml transformation (#318)
1 parent 2702cd3 commit 392be71

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/core_codemods/use_defused_xml.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ def matching_functions(self) -> dict[str, str]:
8383
return _matching_functions
8484

8585
def transform_module_impl(self, tree: cst.Module) -> cst.Module:
86+
if not self.node_is_selected(tree):
87+
return tree
88+
8689
visitor = DefusedXmlModifier(
8790
self.context,
8891
self.file_context,

0 commit comments

Comments
 (0)