From 5d5b3d5ed6f3d3970f09d2977b6bb6c781bda60f Mon Sep 17 00:00:00 2001 From: Amethyst Reese Date: Wed, 16 Oct 2024 16:34:54 -0700 Subject: [PATCH] update the CI ufmt workflow to use ruff formatting (#2900) Summary: Pull Request resolved: https://github.com/facebook/Ax/pull/2900 This updates CI to match the internal formatting config to opt-in the project to ruff formatting via ufmt. simpsons_bandaid Reviewed By: SebastianAment Differential Revision: D64492062 fbshipit-source-id: e88a84884877d16c6e75324c868a3596505b5d44 --- .github/workflows/build-and-test.yml | 5 +---- pyproject.toml | 3 +++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 85c10202598..47cdc247324 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -28,10 +28,7 @@ jobs: - name: Install dependencies # Pin ufmt deps so they match intermal pyfmt. run: | - pip install black==24.2.0 - pip install usort==1.0.8 - pip install libcst==1.1.0 - pip install ufmt + pip install -r requirements-fmt.txt pip install flake8 - name: ufmt run: | diff --git a/pyproject.toml b/pyproject.toml index c1785fbda18..64468a31a62 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,3 +4,6 @@ build-backend = "setuptools.build_meta" [tool.usort] first_party_detection = false + +[tool.ufmt] +formatter = "ruff-api"