File tree Expand file tree Collapse file tree 9 files changed +27
-9
lines changed Expand file tree Collapse file tree 9 files changed +27
-9
lines changed Original file line number Diff line number Diff line change 38
38
python3 -m venv .venv
39
39
# Activate the virtual environment as appropriate for your shell, For example ...
40
40
source .venv/bin/activate
41
+ # The Python code in the extension is formatted using Black.
42
+ python3 -m pip install black
41
43
# Install Python dependencies using `python3`.
42
44
# If you want to use a different interpreter then specify it in the
43
45
# CI_PYTHON_PATH environment variable.
Original file line number Diff line number Diff line change 36
36
workingDirectory : $(Build.SourcesDirectory)
37
37
38
38
- bash : npx prettier "src/**/*.ts*" --check
39
- displayName : " Code Format"
39
+ displayName : " Code Format (TypeScript) "
40
40
workingDirectory : $(Build.SourcesDirectory)
41
41
42
42
- bash : npx prettier "build/**/*.js" --check
43
- displayName : " Code Format"
43
+ displayName : " Code Format (JavaScript) "
44
44
workingDirectory : $(Build.SourcesDirectory)
45
+
46
+ - bash : |
47
+ python -m pip install -U black
48
+ python -m black . --check
49
+ displayName: "Code Format (Python)"
50
+ workingDirectory: $(Build.SourcesDirectory)/pythonFiles
Original file line number Diff line number Diff line change 19
19
compile : ' false'
20
20
21
21
- bash : |
22
- python -m pip install -U pip
23
22
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt
24
23
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python/old_ptvsd --no-cache-dir --implementation py --no-deps --upgrade 'ptvsd==4.3.2'
25
24
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python/new_ptvsd/no_wheels --no-cache-dir --implementation py --no-deps --upgrade --pre ptvsd
Original file line number Diff line number Diff line change @@ -120,6 +120,9 @@ steps:
120
120
displayName: 'Start Display Server (xvfb) to launch VS Code)'
121
121
condition: and(succeeded(), eq(variables['Agent.Os'], 'Linux'))
122
122
123
+ - bash : python -m pip install -U pip
124
+ displayName : ' Install pip'
125
+
123
126
# # Show all versions installed/available on PATH if in verbose mode.
124
127
# # Example command line (windows pwsh):
125
128
# # > Write-Host Node ver: $(& node -v) NPM Ver: $(& npm -v) Python ver: $(& python --version)"
Original file line number Diff line number Diff line change 93
93
# > python -m pip install --upgrade -r build/test-requirements.txt
94
94
# > python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt
95
95
- bash : |
96
- python -m pip install -U pip
97
96
python -m pip install --upgrade -r build/test-requirements.txt
98
97
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt
99
98
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python/old_ptvsd --no-cache-dir --implementation py --no-deps --upgrade 'ptvsd==4.3.2'
@@ -119,7 +118,6 @@ steps:
119
118
# > python -m pip install --upgrade -r build/functional-test-requirements.txt
120
119
# > python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt
121
120
- bash : |
122
- python -m pip install -U pip
123
121
python -m pip install numpy
124
122
python -m pip install --upgrade -r ./build/functional-test-requirements.txt
125
123
displayName: 'pip install functional requirements'
@@ -142,7 +140,6 @@ steps:
142
140
# > python -m pip install --upgrade -r build/ipython-test-requirements.txt
143
141
# > python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt
144
142
- bash : |
145
- python -m pip install -U pip
146
143
python -m pip install numpy
147
144
python -m pip install --upgrade -r ./build/ipython-test-requirements.txt
148
145
displayName: 'pip install ipython requirements'
Original file line number Diff line number Diff line change 1
- Use [ prettier] ( https://prettier.io/ ) as the formatter for ` TypeScript ` code within the extension.
1
+ Use [ prettier] ( https://prettier.io/ ) as the ` TypeScript ` formatter and [ Black ] ( https://github.com/psf/black ) as the ` Python ` formatter within the extension.
Original file line number Diff line number Diff line change 9
9
# Last argument is the target file into which we'll write the env variables as json.
10
10
json_file = sys .argv [- 1 ]
11
11
12
- with open (json_file , 'w' ) as outfile :
12
+ with open (json_file , "w" ) as outfile :
13
13
json .dump (dict (os .environ ), outfile )
Original file line number Diff line number Diff line change
1
+ [tool .black ]
2
+ exclude = '''
3
+
4
+ (
5
+ /(
6
+ .data
7
+ | .vscode
8
+ | lib
9
+ )/
10
+ )
11
+ '''
Original file line number Diff line number Diff line change 37
37
fp .flush ()
38
38
try :
39
39
# ALso log the error for use from the other side.
40
- with open (lock_file + ' .error' , 'w' ) as fpError :
40
+ with open (lock_file + " .error" , "w" ) as fpError :
41
41
fpError .write (traceback .format_exc ())
42
42
except Exception :
43
43
pass
You can’t perform that action at this time.
0 commit comments