File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -93,19 +93,20 @@ def setup_jedi():
93
93
print ("default jedi environment" , jedi .api .environment .get_default_environment ())
94
94
print ("jedi environment" , ENV )
95
95
jedi_cache = pathlib .Path (jedi .settings .cache_directory )
96
- if jedi_cache .exists ():
97
- shutil .rmtree (jedi_cache )
98
- print ("removed jedi cache!" )
99
- else :
100
- print ("no jedi cache was found!" )
96
+ return jedi_cache .exists ()
101
97
102
98
103
99
def warm_up (modules ):
104
100
print_env ()
105
101
print ("-" * 80 )
106
102
print_versions ()
107
103
print ("-" * 80 )
108
- setup_jedi ()
104
+ cache_exists = setup_jedi ()
105
+ if cache_exists :
106
+ print ("jedi cache already exists, aborting warm up!" )
107
+ return
108
+ else :
109
+ print ("no jedi cache was found, warming up!" )
109
110
print ("-" * 80 )
110
111
start = time .time ()
111
112
[warm_up_one (module ) for module in modules ]
@@ -115,4 +116,4 @@ def warm_up(modules):
115
116
116
117
117
118
if __name__ == "__main__" :
118
- warm_up (sorted (set (sys .argv [1 :] or MODULES_TO_CACHE )))
119
+ warm_up (sorted (set (sys .argv [2 :] or MODULES_TO_CACHE )))
You can’t perform that action at this time.
0 commit comments