File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change 4
4
import contextlib
5
5
import sys
6
6
import io
7
- import os
8
7
9
8
from .torchfix import TorchCodemod , TorchCodemodConfig
10
9
from .common import CYAN , ENDC
@@ -55,13 +54,11 @@ def main() -> None:
55
54
MARKER = "torch" # this will catch import torch or functorch
56
55
torch_files = []
57
56
for file in files :
58
- # TODO: remove the check when https://github.com/Instagram/LibCST/pull/994 lands
59
- if os .path .isfile (file ): # `codemod.gather_files` can return dirs with ".py"
60
- with open (file , errors = "replace" ) as f :
61
- for line in f :
62
- if MARKER in line :
63
- torch_files .append (file )
64
- break
57
+ with open (file , errors = "replace" ) as f :
58
+ for line in f :
59
+ if MARKER in line :
60
+ torch_files .append (file )
61
+ break
65
62
66
63
config = TorchCodemodConfig ()
67
64
config .select = args .select
You can’t perform that action at this time.
0 commit comments