File: run_black.yml

package info (click to toggle)
python-azure 20230112%2Bgit-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 749,544 kB
  • sloc: python: 6,815,827; javascript: 287; makefile: 195; xml: 109; sh: 105
file content (26 lines) | stat: -rw-r--r-- 722 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
parameters:
  ServiceDirectory: ''
  ValidateFormatting: false
  EnvVars: {}

steps:
  - task: UsePythonVersion@0
    displayName: 'Use Python 3.7'
    inputs:
     versionSpec: '3.7'
    condition: succeededOrFailed()

  - script: |
      pip install black==21.6b0
    displayName: 'Prep Environment'
    condition: succeededOrFailed()

  - task: PythonScript@0
    displayName: 'Run Black'
    inputs:
      scriptPath: 'scripts/devops_tasks/validate_formatting.py'
      arguments: >-
        --service_directory="${{ parameters.ServiceDirectory }}"
        --validate="${{ parameters.ValidateFormatting }}"
    env: ${{ parameters.EnvVars }}
    condition: and(succeededOrFailed(), ne(variables['Skip.Pylint'],'true'))