From 317eadf86f272994bf62cbb03fcb1c98ae94b5f8 Mon Sep 17 00:00:00 2001 From: Wang Guan Date: Mon, 18 Mar 2024 02:40:51 +0900 Subject: [PATCH 1/3] ci: run ruff format --- .github/workflows/check-pr.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/check-pr.yml b/.github/workflows/check-pr.yml index 56c326d..2801db0 100644 --- a/.github/workflows/check-pr.yml +++ b/.github/workflows/check-pr.yml @@ -16,3 +16,4 @@ jobs: cache: 'pip' - run: pip install -r requirements.txt - run: ruff . + - run: ruff format . From f78f27805fcf1e7e7650d4c2ae150a0f6df99abf Mon Sep 17 00:00:00 2001 From: Wang Guan Date: Mon, 18 Mar 2024 03:01:11 +0900 Subject: [PATCH 2/3] ci: reject when ruff requires format change --- .github/workflows/check-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-pr.yml b/.github/workflows/check-pr.yml index 2801db0..e01a784 100644 --- a/.github/workflows/check-pr.yml +++ b/.github/workflows/check-pr.yml @@ -16,4 +16,4 @@ jobs: cache: 'pip' - run: pip install -r requirements.txt - run: ruff . - - run: ruff format . + - run: ruff format --diff . From 9fea4054577b4ec7843ecb2d81135b938cb71b2a Mon Sep 17 00:00:00 2001 From: Wang Guan Date: Mon, 18 Mar 2024 03:02:35 +0900 Subject: [PATCH 3/3] make ruff happy --- app/apis/team.py | 1 + 1 file changed, 1 insertion(+) diff --git a/app/apis/team.py b/app/apis/team.py index 65ab993..16427b6 100644 --- a/app/apis/team.py +++ b/app/apis/team.py @@ -342,6 +342,7 @@ class TeamProjectImportAPI(MoeAPIView): """ Create new Project in current ProjectSet/Team, from exported Project JSON """ + @token_required @fetch_model(Team) @fetch_model(ProjectSet)