Skip to content

Updated solution to stalled lint #31

Updated solution to stalled lint

Updated solution to stalled lint #31

Workflow file for this run

name: python_lint
on:
push:
branches: "**"
pull_request:
types: [opened, reopened, synchronize, closed]
branches: "**"
jobs:
flake8_py3:
runs-on: ubuntu-latest
steps:
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: 3.9.x
architecture: x64
- name: Checkout PyTorch
uses: actions/checkout@v3
fetch-depth: 0

Check failure on line 21 in .github/workflows/python_lint.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/python_lint.yml

Invalid workflow file

You have an error in your yaml syntax on line 21
- name: Install flake8
run: pip install flake8
- name: Check for Python file changes
id: file_check
uses: tj-actions/changed-files@v33
- name: Run flake8
if: steps.file_check.outputs.any_changed == 'true'
run: flake8 --ignore E501,W503,E203,W605
- name: No Python files changed
if: steps.file_check.outputs.any_changed != 'true'
run: echo "No Python files have been changed."
black_lint:
runs-on: ubuntu-latest
steps:
- name: Setup
uses: actions/checkout@v3
fetch-depth: 0
- name: Install black in jupyter
run: pip install black[jupyter]
- name: Check for Python file changes
id: file_check
uses: tj-actions/changed-files@v34
- name: Check code lints with Black
if: steps.file_check.outputs.any_changed == 'true'
uses: psf/black@stable
- name: No Python files changed
if: steps.file_check.outputs.any_changed != 'true'
run: echo "No Python files have been changed."