From 0a073429d2139b5947212863b32b222a09239cd3 Mon Sep 17 00:00:00 2001 From: Taekyung Heo <7621438+TaekyungHeo@users.noreply.github.com> Date: Fri, 22 Mar 2024 17:11:25 -0700 Subject: [PATCH] Set up black for GitHub CI pipeline (#99) Summary: This PR introduces a linter, black, for linting purposes. Pull Request resolved: https://github.com/facebookresearch/param/pull/99 Test Plan: Please refer to the actions tab of the forked repository ([link](https://github.com/TaekyungHeo/param/actions)). At present, PARAM does not pass the linter checks. Additional refactoring is necessary. Reviewed By: briancoutinho Differential Revision: D55261475 Pulled By: shengfukevin fbshipit-source-id: 2c92790e60e1e3fb1ed17fb2f4c6954a755bec18 --- .github/workflows/python_lint.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/python_lint.yml diff --git a/.github/workflows/python_lint.yml b/.github/workflows/python_lint.yml new file mode 100644 index 00000000..88d408ab --- /dev/null +++ b/.github/workflows/python_lint.yml @@ -0,0 +1,21 @@ +name: Python Linting + +on: [push, pull_request] + +jobs: + lint-and-format: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.8' + + - name: Install dependencies + run: | + pip install black + - name: Run Black + run: black . --check