File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3838python3 -m venv .venv
3939# Activate the virtual environment as appropriate for your shell, For example ...
4040source .venv/bin/activate
41+ # The Python code in the extension is formatted using Black.
42+ python3 -m pip install black
4143# Install Python dependencies using `python3`.
4244# If you want to use a different interpreter then specify it in the
4345# CI_PYTHON_PATH environment variable.
Original file line number Diff line number Diff line change 3636 workingDirectory : $(Build.SourcesDirectory)
3737
3838 - bash : npx prettier "src/**/*.ts*" --check
39- displayName : " Code Format"
39+ displayName : " Code Format (TypeScript) "
4040 workingDirectory : $(Build.SourcesDirectory)
4141
4242 - bash : npx prettier "build/**/*.js" --check
43- displayName : " Code Format"
43+ displayName : " Code Format (JavaScript) "
4444 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 1919 compile : ' false'
2020
2121 - bash : |
22- python -m pip install -U pip
2322 python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt
2423 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'
2524 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:
120120 displayName: 'Start Display Server (xvfb) to launch VS Code)'
121121 condition: and(succeeded(), eq(variables['Agent.Os'], 'Linux'))
122122
123+ - bash : python -m pip install -U pip
124+ displayName : ' Install pip'
125+
123126 # # Show all versions installed/available on PATH if in verbose mode.
124127 # # Example command line (windows pwsh):
125128 # # > Write-Host Node ver: $(& node -v) NPM Ver: $(& npm -v) Python ver: $(& python --version)"
Original file line number Diff line number Diff line change 9393 # > python -m pip install --upgrade -r build/test-requirements.txt
9494 # > python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt
9595 - bash : |
96- python -m pip install -U pip
9796 python -m pip install --upgrade -r build/test-requirements.txt
9897 python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt
9998 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:
119118 # > python -m pip install --upgrade -r build/functional-test-requirements.txt
120119 # > python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt
121120 - bash : |
122- python -m pip install -U pip
123121 python -m pip install numpy
124122 python -m pip install --upgrade -r ./build/functional-test-requirements.txt
125123 displayName: 'pip install functional requirements'
@@ -142,7 +140,6 @@ steps:
142140 # > python -m pip install --upgrade -r build/ipython-test-requirements.txt
143141 # > python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt
144142 - bash : |
145- python -m pip install -U pip
146143 python -m pip install numpy
147144 python -m pip install --upgrade -r ./build/ipython-test-requirements.txt
148145 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 99# Last argument is the target file into which we'll write the env variables as json.
1010json_file = sys .argv [- 1 ]
1111
12- with open (json_file , 'w' ) as outfile :
12+ with open (json_file , "w" ) as outfile :
1313 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 3737 fp .flush ()
3838 try :
3939 # 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 :
4141 fpError .write (traceback .format_exc ())
4242 except Exception :
4343 pass
You can’t perform that action at this time.
0 commit comments