File tree 2 files changed +4
-1
lines changed
spyder/plugins/pythonpath
2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ def test_check_path(tmp_path):
28
28
assert not check_path ('lib\\ dist-packages' )
29
29
assert not check_path ('Lib/site-packages' )
30
30
assert not check_path ('Anaconda3/pkgs' )
31
+ assert not check_path ("C:\\ Users\\ user\\ AppData\\ Roaming\\ Python\\ Scripts" )
31
32
else :
32
33
# One digit Python versions
33
34
assert not check_path ('lib/python3.9/site-packages' )
Original file line number Diff line number Diff line change @@ -22,9 +22,11 @@ def check_path(path):
22
22
"""
23
23
pattern_string = r'(ana|mini|micro)(conda|mamba|forge)\d*(/base)*/pkgs'
24
24
if os .name == 'nt' :
25
+ path_appdata = os .getenv ("APPDATA" ).replace ('\\ ' , '/' )
25
26
pattern_string = (
26
27
f'.*({ pattern_string } '
27
- r'|(l|L)ib/(site|dist)-packages).*'
28
+ r'|(l|L)ib/(site|dist)-packages.*'
29
+ f'|(AppData|{ path_appdata } )/Roaming/Python).*'
28
30
)
29
31
else :
30
32
pattern_string = (
You can’t perform that action at this time.
0 commit comments