GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Check formatting of Python code in AzDO pipelines (#9743) · ilexei/vscode-python@0a9a7b7

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • CONTRIBUTING.md
  • build/ci/templates
    • jobs
      • build_compile.yml
    • steps
      • build.yml
      • initialization.yml
    • test_phases.yml
  • news/3 Code Health
    • 2012.md
  • pythonFiles
    • printEnvVariablesToFile.py
    • pyproject.toml
    • shell_exec.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎CONTRIBUTING.md‎

Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+2Lines changed: 2 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ npm ci
3838
python3 -m venv .venv
3939
# Activate the virtual environment as appropriate for your shell, For example ...
4040
source .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.
Collapse file

‎build/ci/templates/jobs/build_compile.yml‎

Copy file name to clipboardExpand all lines: build/ci/templates/jobs/build_compile.yml
+8-2Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,15 @@ jobs:
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
Collapse file

‎build/ci/templates/steps/build.yml‎

Copy file name to clipboardExpand all lines: build/ci/templates/steps/build.yml
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ steps:
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
Collapse file

‎build/ci/templates/steps/initialization.yml‎

Copy file name to clipboardExpand all lines: build/ci/templates/steps/initialization.yml
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff 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)"
Collapse file

‎build/ci/templates/test_phases.yml‎

Copy file name to clipboardExpand all lines: build/ci/templates/test_phases.yml
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ steps:
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'
Collapse file

‎news/3 Code Health/2012.md‎

Copy file name to clipboard
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
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.
Collapse file

‎pythonFiles/printEnvVariablesToFile.py‎

Copy file name to clipboardExpand all lines: pythonFiles/printEnvVariablesToFile.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
# Last argument is the target file into which we'll write the env variables as json.
1010
json_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)
Collapse file

‎pythonFiles/pyproject.toml‎

Copy file name to clipboard
+11Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[tool.black]
2+
exclude = '''
3+
4+
(
5+
/(
6+
.data
7+
| .vscode
8+
| lib
9+
)/
10+
)
11+
'''
Collapse file

‎pythonFiles/shell_exec.py‎

Copy file name to clipboardExpand all lines: pythonFiles/shell_exec.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
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

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.