diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index bdcab8f23..087929806 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,12 +1,15 @@ name: Lint -on: +on: push: paths: - '*.py' + pull_request: + paths: + - '*.py' jobs: - flake8_py3: + format_and_lint: runs-on: ubuntu-latest steps: - name: Setup Python @@ -16,7 +19,11 @@ jobs: architecture: x64 - name: Checkout PyTorch uses: actions/checkout@master - - name: Python Pylin GitHub Action + - name: Run Black + uses: psf/black@stable + with: + options: "--check --verbose --line-length=120" + - name: Python Pylint GitHub Action uses: vcoder4c/git_pylint@v3 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file